use TAG to identify CleanCacheWorker to WorkManager

TAG is already there, and it is meant to identify this class, and be
unique.
This commit is contained in:
Hans-Christoph Steiner 2021-01-06 16:12:47 +01:00
parent 06dbd048af
commit 9eba243092

View File

@ -52,8 +52,7 @@ public class CleanCacheWorker extends Worker {
new PeriodicWorkRequest.Builder(CleanCacheWorker.class, interval, TimeUnit.MILLISECONDS) new PeriodicWorkRequest.Builder(CleanCacheWorker.class, interval, TimeUnit.MILLISECONDS)
.setConstraints(constraintsBuilder.build()) .setConstraints(constraintsBuilder.build())
.build(); .build();
workManager.enqueueUniquePeriodicWork("clean_cache", workManager.enqueueUniquePeriodicWork(TAG, ExistingPeriodicWorkPolicy.REPLACE, cleanCache);
ExistingPeriodicWorkPolicy.REPLACE, cleanCache);
Utils.debugLog(TAG, "Scheduled periodic work for cleaning the cache."); Utils.debugLog(TAG, "Scheduled periodic work for cleaning the cache.");
} }