socialpandas / sidekiq-priority

Prioritize Sidekiq jobs within queues
MIT License
47 stars 6 forks source link

Can you schedule and prioritize with this gem? #10

Open nilatti opened 8 years ago

nilatti commented 8 years ago

I am trying to find a gem that will allow me to combine prioritization in Sidekiq with scheduling.

Sidekiq currently has a perform_at method that allows me to set a certain time for a job, but if two jobs are scheduled for the same time, which wins?

I am trying to do something like:

AnnouncementScheduler.perform_with_priority_at(:low, " 2016-07-08 08:34:53 -0400", a.id) AnnouncementScheduler.perform_with_priority_at(:very_high, " 2016-07-08 08:34:53 -0400", b.id)

where the scheduling conflict would resolve in favor of the second one, due to priority.

I just wondered if your gem already does this, as I don't see anything for that in the documentation, but often miss things.

wasif-saee-1993 commented 4 years ago

@nilatti i am facing the same challenge. Can you share the solution for this problem