Reputation: 5694
I am investigating Android work manager
implementation 'android.arch.work:work-runtime:1.0.0-rc01'
My experiments all complete fine, however when I try chaining work with a unique name my logcat messages contain this
2019-02-18 11:56:37.179 11272-11288/com.chainganger E/WM-EnqueueRunnable: Prerequisite 25d3729f-a7f0-4698-b80d-0fad8b22f5fe doesn't exist; not enqueuing
2019-02-18 11:56:37.367 11272-11288/com.chainganger E/WM-EnqueueRunnable: Prerequisite 73c59e35-f349-4a4d-b46c-9757be46c63b doesn't exist; not enqueuing
2019-02-18 11:56:37.550 11272-11288/com.chainganger E/WM-EnqueueRunnable: Prerequisite a64c6e5d-cdef-477f-a677-75939c1bd083 doesn't exist; not enqueuing
2019-02-18 11:56:37.726 11272-11288/com.chainganger E/WM-EnqueueRunnable: Prerequisite 99c75815-07dd-48fb-8b02-3705b57d9008 doesn't exist; not enqueuing
2019-02-18 11:56:37.926 11272-11288/com.chainganger E/WM-EnqueueRunnable: Prerequisite 2b108a20-3c78-4201-9294-44b0f1dfdc53 doesn't exist; not enqueuing
These messages appear when I attempt to start multiple occurrences of the same Unique work
Here is my code
final OneTimeWorkRequest syncStageOne = new OneTimeWorkRequest.Builder(SyncStageOne.class).addTag(SYNC_STAGE_ONE_IN_PROGRESS_TAG).build();
final OneTimeWorkRequest syncStageTwo = new OneTimeWorkRequest.Builder(SyncStageTwo.class).addTag(SYNC_STAGE_TWO_IN_PROGRESS_TAG).build();
mWorkManager.beginUniqueWork(SYNC_CHAINED_UNIQUE_NAME, ExistingWorkPolicy.KEEP, syncStageOne).then(syncStageTwo).enqueue();
The unique work actually completes OK.
What have I done wrong to get these error messages?
Upvotes: 3
Views: 592
Reputation: 21104
They are not really errors. You are probably trying to chain on WorkRequest
s which no longer exist due to a Existing{Work|PeriodicWork}Policy.REPLACE
.
I would not worry about them.
Upvotes: 3