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 need a job to run once X time after the last occurrence of an repeating event.
For example, In UI and game development I've seen this behavior when a user hits a button a something happens only N seconds after the last hit. Any other hit before N seconds cancels the old timer and sets a new one.
To put you in context, my site is an e-commerce and I need to implement a feature where 30min or so after the last time the user seen a page (a pageview in analytics terms), a marketing email is sent to they.
The way I solved this with Ruby and Sidekiq was running this algorithm each time a pageview event for a n user is created:
if (is there an associated job ID for this user?) {
cancel that job
}
schedule a job to send the email 30 minutes from now
associate the ID for the job I've just created with this user
TL;DR: I need a way to dequeue jobs.
I see there is a dequeue function in Exq.Redis.JobQueue. There is no interface in Exq.Enqueuer.EnqueueApi to use it though. Is there a particular reason not to expose this feature?
The text was updated successfully, but these errors were encountered:
I need a job to run once X time after the last occurrence of an repeating event.
For example, In UI and game development I've seen this behavior when a user hits a button a something happens only N seconds after the last hit. Any other hit before N seconds cancels the old timer and sets a new one.
To put you in context, my site is an e-commerce and I need to implement a feature where 30min or so after the last time the user seen a page (a pageview in analytics terms), a marketing email is sent to they.
The way I solved this with Ruby and Sidekiq was running this algorithm each time a pageview event for a n user is created:
TL;DR: I need a way to dequeue jobs.
I see there is a dequeue function in
Exq.Redis.JobQueue
. There is no interface inExq.Enqueuer.EnqueueApi
to use it though. Is there a particular reason not to expose this feature?The text was updated successfully, but these errors were encountered: