val WORK_NAME = "MY_UNIQUE_NAME"val work = OneTimeWorkRequestBuilder<ProcessImageWithPagingWorker>() // .addTag(WORK_NAME) .build()WorkManager.getInstance().enqueueUniqueWork(WORK_NAME, ExistingWorkPolicy.REPLACE, work)
enqueueUniqueWork This method allows you to enqueue work requests to a uniquely-named WorkContinuation, where only one continuation of a particular name can be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.
The uniqueWorkName uniquely identifies this WorkContinuation.