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
Hi,
While working on a problem I came across a scenario where I had to update delayed interval for a Job.
My use case was to only increase the delayed interval based on some event.
I had gone through DOC and Code and asked around On StackOverFlow but could not find any existing method to achieve this.
Also created a Q&A Discussion as well: Q&A discussion
So I came up with the following approach:
But this approach is not optimal, Since job.remove() is (as @manast suggested): O(n) of the number of waiting jobs, and O(logN) for the rest of the states (which use sets).
It would be very good to have function which can update (extend or reduce)delayed interval of an existing Job.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
While working on a problem I came across a scenario where I had to update delayed interval for a Job.
My use case was to only increase the delayed interval based on some event.
I had gone through DOC and Code and asked around On StackOverFlow but could not find any existing method to achieve this.
Also created a Q&A Discussion as well: Q&A discussion
So I came up with the following approach:
But this approach is not optimal, Since job.remove() is (as @manast suggested):
O(n) of the number of waiting jobs, and O(logN) for the rest of the states (which use sets)
.It would be very good to have function which can update (extend or reduce) delayed interval of an existing Job.
Beta Was this translation helpful? Give feedback.
All reactions