Skip to content

doWork called multiple times  #99

@rahuldevanavar91

Description

@rahuldevanavar91

I am using

implementation("android.arch.work:work-runtime:1.0.0-alpha09")

doWork method called multiple time for given shdedule time
this is my initialization


PeriodicWorkRequest.Builder photoWorkBuilder =
                new PeriodicWorkRequest.Builder(NotificationPoolingService.class, 16,
                        TimeUnit.MINUTES);
// ...if you want, you can apply constraints to the builder here...
// Create the actual work object:
        PeriodicWorkRequest myWork = photoWorkBuilder.build();
// Then enqueue the recurring task:
        WorkManager.getInstance().enqueue(myWork);

Logs```

10-17 15:39:26.259 10637-10808/? I/NotificationPoolingService: doWOrk
10-17 15:39:26.264 10637-10666/? I/WorkerWrapper: Worker result SUCCESS for Work [ id=b2e8fffe-5ac6-42dd-b992-edf1497fa6fb, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:39:26.288 10637-11208/? I/NotificationPoolingService: doWOrk
10-17 15:39:26.290 10637-10666/? I/WorkerWrapper: Worker result SUCCESS for Work [ id=b2e8fffe-5ac6-42dd-b992-edf1497fa6fb, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:40:00.025 16329-16855/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:40:00.039 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=45d9334f-2ef7-42e3-8fa5-4add0e3f6bcc, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:43:59.950 16329-17878/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:43:59.968 16329-16855/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:43:59.971 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=edfd7a83-06fc-4e29-a526-7e15b4f670dc, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:43:59.979 16329-17879/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:43:59.984 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=d97426a7-4fbf-4861-9280-355689c9e0c7, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:43:59.999 16329-16367/com.manash.purplle I/WorkerWrapper: Worker result SUCCESS for Work [ id=c7478815-60c8-4fbb-85c7-b7123aaf3a7d, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:44:00.030 16329-17878/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:00.042 16329-16855/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:00.044 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=a12318c2-1e4b-4f49-a089-bce080f5ddd4, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:44:00.067 16329-17879/com.ex.work  I/NotificationPoolingService: doWOrk
10-17 15:44:00.068 16329-16367/com.ex.work  I/WorkerWrapper: Worker result SUCCESS for Work [ id=720440f3-9c7e-4671-9b4d-05e1b388d8cd, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:44:00.084 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=edfd7a83-06fc-4e29-a526-7e15b4f670dc, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:44:00.105 16329-17878/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:00.115 16329-16855/com.ex.work  I/NotificationPoolingService: doWOrk
10-17 15:44:00.120 16329-17879/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:00.121 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=ff1da764-4752-4541-b289-ab190f2ce683, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:44:00.128 16329-16367/com.manash.purplle I/WorkerWrapper: Worker result SUCCESS for Work [ id=c7478815-60c8-4fbb-85c7-b7123aaf3a7d, tags={ com.ex.work.helper.NotificationPoolingService } ]
10-17 15:44:00.131 16329-16367/com.ex.work.purplle I/WorkerWrapper: Worker result SUCCESS for Work [ id=d97426a7-4fbf-4861-9280-355689c9e0c7, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:44:00.144 16329-17878/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:00.146 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=ff1da764-4752-4541-b289-ab190f2ce683, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:44:32.915 16329-16855/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:32.917 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=1c2cb7ce-8f6e-4923-846d-e8b185f8ace9, tags={ com.manash.purplle.helper.NotificationPoolingService } ]
10-17 15:44:32.939 16329-17879/com.ex.work I/NotificationPoolingService: doWOrk
10-17 15:44:32.941 16329-16367/com.ex.work I/WorkerWrapper: Worker result SUCCESS for Work [ id=558e3d4c-4e7e-49f9-9807-8418cd745442, tags={ com.ex.work.helper.NotificationPoolingService } ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions