librelist archives

« back to archive

Specify processing queue at time of enqueueing

Specify processing queue at time of enqueueing

From:
Jake Austwick
Date:
2012-07-26 @ 12:27
We have a specific case whereby if a user uploads a bulk amount of jobs in
a CSV, we want to stick them in a :bulk queue so that if somebody submits 
one job right after, they don't have to wait until the previous 500 jobs 
are completed. We can then set our workers to check the normal queue 5 
times more than the bulk queue or something along these lines.


Is this something anyone else has needed previously, or any suggested ways
on implementing this? Maybe I'm missing something, but can't see a way to 
implement this.



-- 
Jake Austwick

Re: [sidekiq] Specify processing queue at time of enqueueing

From:
John Firebaugh
Date:
2012-07-26 @ 17:04
On Thu, Jul 26, 2012 at 5:27 AM, Jake Austwick <jake.austwick@gmail.com> wrote:
> We have a specific case whereby if a user uploads a bulk amount of jobs in a
> CSV, we want to stick them in a :bulk queue so that if somebody submits one
> job right after, they don't have to wait until the previous 500 jobs are
> completed. We can then set our workers to check the normal queue 5 times
> more than the bulk queue or something along these lines.
>
> Is this something anyone else has needed previously, or any suggested ways
> on implementing this? Maybe I'm missing something, but can't see a way to
> implement this.

I use `Sidekiq::Client.push` with an explicit 'queue' key to do this.

See https://github.com/mperham/sidekiq/issues/297 for discussion.

Re: [sidekiq] Specify processing queue at time of enqueueing

From:
Jake Austwick
Date:
2012-07-26 @ 17:14
This looks like it'll work perfectly. I tried searching issues, must have 
missed this issue somehow.

Thanks! 

-- 
Jake Austwick
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, 26 July 2012 at 18:04, John Firebaugh wrote:

> On Thu, Jul 26, 2012 at 5:27 AM, Jake Austwick <jake.austwick@gmail.com 
(mailto:jake.austwick@gmail.com)> wrote:
> > We have a specific case whereby if a user uploads a bulk amount of jobs in a
> > CSV, we want to stick them in a :bulk queue so that if somebody submits one
> > job right after, they don't have to wait until the previous 500 jobs are
> > completed. We can then set our workers to check the normal queue 5 times
> > more than the bulk queue or something along these lines.
> > 
> > Is this something anyone else has needed previously, or any suggested ways
> > on implementing this? Maybe I'm missing something, but can't see a way to
> > implement this.
> > 
> 
> 
> I use `Sidekiq::Client.push` with an explicit 'queue' key to do this.
> 
> See https://github.com/mperham/sidekiq/issues/297 for discussion.