mirror of https://github.com/M66B/FairEmail.git
Force restart jobs
This commit is contained in:
parent
76ec103739
commit
11195fe500
|
@ -145,6 +145,7 @@ public class WorkerDailyRules extends Worker {
|
|||
delay = cal.getTimeInMillis() - now;
|
||||
|
||||
EntityLog.log(context, EntityLog.Type.Rules, "Queuing " + getName() + " delay=" + (delay / (60 * 1000L)) + "m");
|
||||
WorkManager.getInstance(context).cancelUniqueWork(getName());
|
||||
PeriodicWorkRequest.Builder builder =
|
||||
new PeriodicWorkRequest.Builder(WorkerDailyRules.class, 1, TimeUnit.DAYS)
|
||||
.setInitialDelay(delay, TimeUnit.MILLISECONDS);
|
||||
|
|
|
@ -90,6 +90,7 @@ public class WorkerSync extends Worker {
|
|||
|
||||
EntityLog.log(context, EntityLog.Type.Cloud,
|
||||
"Queuing " + getName() + " delay=" + (delay / (60 * 1000L)) + "m");
|
||||
WorkManager.getInstance(context).cancelUniqueWork(getName());
|
||||
PeriodicWorkRequest.Builder builder =
|
||||
new PeriodicWorkRequest.Builder(WorkerSync.class, 1, TimeUnit.DAYS)
|
||||
.setInitialDelay(delay, TimeUnit.MILLISECONDS)
|
||||
|
|
Loading…
Reference in New Issue