Hi, another example is sidekiq 'unique: true' option, that is added by https://github.com/mhenrixon/sidekiq-unique-jobs Quite useful feature because several unicorn workers can add jobs with the same parameters and we want only one unique job to be executed.
For example we have learning plans that users complete, we calculate users score in sidekiq. If learning plan structure was updated, we need to recalculate users scores. If learning plan was updated several times, we don't want to calculate users score several times, we want to calculate it only once, after the last change. I don't see how we can check jobs uniqueness before we enqueue a job, because workers are parallel. And I don't see how we can check it during job execution, because sidekiq workers are also parallel. What do you think? There are also other useful options for jobs uniqueness - either to check for uniqueness on job execution or on job adding to a queue. On Tuesday, February 10, 2015 at 7:52:55 PM UTC+3, DHH wrote: > > That's still an open question. I'd like to treat each option we'd consider > passing on to a specific adapter as an invitation to discuss if we can > solve it in an adapter-agnostic way. > > What's the purpose of setting priority on the job rather than using > separate queues, in your mind? > > On Monday, February 9, 2015 at 8:36:38 AM UTC-8, John Negron wrote: >> >> ActiveJob is a great addition to Rails. Many supported backends like >> DelayedJob support other options than what is being passed into the enqueue >> adapter methods. It would be great if the "set" method could delegate >> options into the queue adapters. >> >> For example, DelayedJob has priority set at the job level and setting the >> priority could be done without named queues and other background workers. >> >> Are there any plans for that or would the group be open to a pull request >> for it? >> >> thanks >> John >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
