workstatus observer always in enqueued state

后端 未结 3 812
无人共我
无人共我 2021-01-20 05:54

I am trying to observe my workers but they are always in queued state or sometime it\'s RUNNING but never SUCCEED or

3条回答
  •  暖寄归人
    2021-01-20 06:16

    For your periodic work request you should see

    ENQUEUED - RUNNING - ENQUEUED
    

    where the latter ENQUEUED is the state of the next work request.

    You might get very briefly a SUCCEEDED between RUNNING and ENQUEUED, but I have never seen that.

    For a onetime work request you see

    ENQUEUED - RUNNING - SUCCEEDED
    

    or whatever you return in doWork().

    (Android 8.1 API 27, 1.0.0-alpha04)

提交回复
热议问题