librelist archives

« back to archive

enqueing a job at application start-up

enqueing a job at application start-up

From:
tim pletcher
Date:
2011-11-15 @ 16:05
i need to fire a job at application start-up that initiates a rabbitmq
subscriber function. haven't been able to get that to work. i have other
resque workers that are initiated via controller actions that enqueue jobs
that of course are working with no issues...

would appreciate any input from folks having to solve to a similar
pattern...

Re: [resque] enqueing a job at application start-up

From:
Josh Nesbitt
Date:
2011-11-15 @ 16:11
Assuming you're using Rails couldn't you enqueue a job inside an 
initialiser after Resque has loaded?

On 15 Nov 2011, at 16:05, tim pletcher wrote:

i need to fire a job at application start-up that initiates a rabbitmq 
subscriber function. haven't been able to get that to work. i have other 
resque workers that are initiated via controller actions that enqueue jobs
that of course are working with no issues...

would appreciate any input from folks having to solve to a similar pattern...

Re: [resque] enqueing a job at application start-up

From:
tim pletcher
Date:
2011-11-15 @ 17:07
Hey Josh,

Thanks. That does work. I was already using an initializer for the rabbitmq
connection, so ended up just moving that into the worker and simply
enqueuing the worker in the initializer.

cheers,

TP

On Tue, Nov 15, 2011 at 10:11 AM, Josh Nesbitt <joshnesbitt@gmail.com>wrote:

> Assuming you're using Rails couldn't you enqueue a job inside an
> initialiser after Resque has loaded?
>
> On 15 Nov 2011, at 16:05, tim pletcher wrote:
>
> i need to fire a job at application start-up that initiates a rabbitmq
> subscriber function. haven't been able to get that to work. i have other
> resque workers that are initiated via controller actions that enqueue jobs
> that of course are working with no issues...
>
> would appreciate any input from folks having to solve to a similar
> pattern...
>
>