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
i want to allow a job(same class, args and queue) to be schedule only once... is that possible? i found out that there isn't any easi api to get scheduled jobs or to verify running jobs... i kinda use Verk.SortedSet.range/4 for that but idk if that is consistent.... i've seen duplicate jobs scheduling nevertheless
The text was updated successfully, but these errors were encountered:
If the goal is simply to prevent rescheduling, one possible solution:
create a new set scheduled
serialize every Job struct to a string
before scheduling, attempt to write the serialized Job to the scheduled set using an atomic read/update command, possibly HSETNX
only schedule the Job if HSETNX returns 1, otherwise we discard it as a duplicate
The main issue that arises: how we do garbage collect the set? The maximum set size is ~14mil (2^32), so if you are doing normal-ish production volume then you can't persist the set forever. How much of a problem this is depends on the requirements you had in mind @fcevado.
i want to allow a job(same class, args and queue) to be schedule only once... is that possible? i found out that there isn't any easi api to get scheduled jobs or to verify running jobs... i kinda use
Verk.SortedSet.range/4
for that but idk if that is consistent.... i've seen duplicate jobs scheduling neverthelessThe text was updated successfully, but these errors were encountered: