Skip to content

Commit

Permalink
Fix worker tag
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jan 3, 2024
1 parent e038ab9 commit 8238398
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,14 @@ internal class BackgroundJobManagerImpl(
override fun startFilesUploadJob(user: User) {
val data = workDataOf(FileUploadWorker.ACCOUNT to user.accountName)

val tag = startFileUploadJobTag(user)

val request = oneTimeRequestBuilder(FileUploadWorker::class, JOB_FILES_UPLOAD, user)
.addTag(tag)
.setInputData(data)
.build()

workManager.enqueueUniqueWork(startFileUploadJobTag(user), ExistingWorkPolicy.KEEP, request)
workManager.enqueueUniqueWork(tag, ExistingWorkPolicy.KEEP, request)
}

override fun getFileUploads(user: User): LiveData<List<JobInfo>> {
Expand Down

0 comments on commit 8238398

Please sign in to comment.