|
|
@ -154,6 +154,7 @@ public class WorkerDailyRules extends Worker {
|
|
|
|
delay = cal.getTimeInMillis() - now;
|
|
|
|
delay = cal.getTimeInMillis() - now;
|
|
|
|
|
|
|
|
|
|
|
|
EntityLog.log(context, EntityLog.Type.Rules, "Queuing " + getName() + " delay=" + (delay / (60 * 1000L)) + "m");
|
|
|
|
EntityLog.log(context, EntityLog.Type.Rules, "Queuing " + getName() + " delay=" + (delay / (60 * 1000L)) + "m");
|
|
|
|
|
|
|
|
WorkManager.getInstance(context).cancelUniqueWork(getName());
|
|
|
|
PeriodicWorkRequest.Builder builder =
|
|
|
|
PeriodicWorkRequest.Builder builder =
|
|
|
|
new PeriodicWorkRequest.Builder(WorkerDailyRules.class, 1, TimeUnit.DAYS)
|
|
|
|
new PeriodicWorkRequest.Builder(WorkerDailyRules.class, 1, TimeUnit.DAYS)
|
|
|
|
.setInitialDelay(delay, TimeUnit.MILLISECONDS);
|
|
|
|
.setInitialDelay(delay, TimeUnit.MILLISECONDS);
|
|
|
|