JobCreator get call with a tag on application start and without JobRequestBuilder
See original GitHub issueHi,
My application starts a periodic job under certain circumstances, like the user click on a periodic time to sync data from the UI. I found an issue, where the JobCreator is called with a tag and start a periodic job, but it shouldn’t.
//In the Application Class
JobManager.create(this).addJobCreator(MyJobCreator())
//My Creator
class MyJobCreator : JobCreator {
override fun create(tag: String): Job? {
Timber.d(">>>>>>>>>>>>>>>>>>>>>>>$tag") // TAG FOUND BUT SHOULDN'T
return when (tag) {
Constants.MY_JOB_TAG -> {
Timber.d(">>>>>>>>>>>>>>>> MY JOB tag found!! WHY?????")
MyJobService()
}
else -> null
}
}
}
The JobRequest.Builder(Constants.MY_JOB_TAG) is not called from the app, only when the user chose to start a schedule job.
I think that the issue comes from the Application class, where MyJobCreator is added.
Thx
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There seems to be an issue in your logic. Not sure what I should do now.
Please create a sample project at Github that I can easily checkout. I don’t have the time to setup everything manually.