You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Check for running serial / id in BackgroundExecutor #979
As explained here, I use @Background a lot in my app. I use serial and id a lot too.
It would be very nice to be able to check if a task has already been submitted with a given id or serial. That would allow to avoid stacking a new task if one is already pending / running. Methods could be:
Yeah that's what I used in some places, but here's a few limitations with this method :
If the existing task with this id has the same serial than other ones, the order in which they'll get executed will change. I don't want that.
If the existing task with this id is currently running, there's a few situations in which I want to let it finish normally and not add another one with the same id.
In these cases I'd like to be able to "skip" the call I was about to do, and let the existing tasks as they are.
Hi,
As explained here, I use
@Backgrounda lot in my app. I useserialandida lot too.It would be very nice to be able to check if a task has already been submitted with a given id or serial. That would allow to avoid stacking a new task if one is already pending / running. Methods could be:
BackgroundExecutor.hasSerialPending(serial)BackgroundExecutor.hasIdPending(serial)BackgroundExecutor.hasSerialRunning(serial)BackgroundExecutor.hasIdRunning(serial)What do you think?