I don't feel too comfortable to put up a bunch of dependencies in the application's component when the workers might be already finished and the app might be running... so having a scope for it would maybe make sense? Or maybe use it's service's scope?
dave08
01/25/2022, 2:46 PM
I just noticed the javadocs on
@HiltWorker
...
Only dependencies available in the SingletonComponent can be injected into the Worker.
.... why?
dave08
01/25/2022, 4:24 PM
Also, having the worker's coroutine scope in the component would maybe be nice so it could also be injected...