librelist archives

« back to archive

cross project resque communication

cross project resque communication

From:
Karl Baum
Date:
2010-05-22 @ 18:21
Is it possible to kick off a resque job sitting within a separate project?
Another words i want to kick off a job, but i do not have access to the 
job class instance within my current path.

thx

Re: [resque] cross project resque communication

From:
Date:
2010-05-22 @ 18:26
I do this either by recreating a Job class in the new project, or by  
sharing the code between projects.

Hth

-- Thibaut

Le 22 mai 2010 à 20:21, Karl Baum <karl.baum@gmail.com> a écrit :

> Is it possible to kick off a resque job sitting within a separate  
> project?  Another words i want to kick off a job, but i do not have  
> access to the job class instance within my current path.
>
> thx
>

Re: [resque] cross project resque communication

From:
Karl Baum
Date:
2010-05-22 @ 19:04
Thats an option, but I would like to keep the projects as decoupled as 
possible and avoid duplicating or sharing code.  Could resque support 
passing a job name string instead the actual class?

thx!

Sent from my iPad

On May 22, 2010, at 2:26 PM, thibaut.barrere@gmail.com wrote:

> I do this either by recreating a Job class in the new project, or by  
> sharing the code between projects.
> 
> Hth
> 
> -- Thibaut
> 
> Le 22 mai 2010 à 20:21, Karl Baum <karl.baum@gmail.com> a écrit :
> 
>> Is it possible to kick off a resque job sitting within a separate  
>> project?  Another words i want to kick off a job, but i do not have  
>> access to the job class instance within my current path.
>> 
>> thx
>> 

Re: [resque] cross project resque communication

From:
Michael Russo
Date:
2010-05-22 @ 20:46
On 2010-05-22, at 3:04 PM, Karl Baum wrote:

> Thats an option, but I would like to keep the projects as decoupled as 
possible and avoid duplicating or sharing code.  Could resque support 
passing a job name string instead the actual class?
> 
> thx!
> 

Take a look at the Job.create method -- it expects string arguments for 
queue and class names.

Re: [resque] cross project resque communication

From:
Karl Baum
Date:
2010-05-23 @ 00:53
This looks great.  Thanks!
On May 22, 2010, at 4:46 PM, Michael Russo wrote:

> On 2010-05-22, at 3:04 PM, Karl Baum wrote:
>
>> Thats an option, but I would like to keep the projects as decoupled  
>> as possible and avoid duplicating or sharing code.  Could resque  
>> support passing a job name string instead the actual class?
>>
>> thx!
>>
>
> Take a look at the Job.create method -- it expects string arguments  
> for queue and class names.

Re: [resque] cross project resque communication

From:
Adam Fields
Date:
2010-05-22 @ 18:43
On Sat, May 22, 2010 at 08:26:40PM +0200, thibaut.barrere@gmail.com wrote:
> I do this either by recreating a Job class in the new project, or by  
> sharing the code between projects.

You could add a queueing action to an appropriate controller and proxy
it via an http request.

-- 
				- Adam
----------
If you liked this email, you might also like:
"Eye-One Display 2 is much better than the Spyder (2, at least)" 
-- http://workstuff.tumblr.com/post/611906312
"In praise of the Sous Vide Supreme" 
-- http://www.aquick.org/blog/2010/05/17/in-praise-of-the-sous-vide-supreme/
"Brooklyn Botanic Garden" 
-- http://www.flickr.com/photos/fields/4520236537/
"fields: Kevin Costner 'oil vacuum' being tested by BP to clean up the 
spill: h..." 
-- http://twitter.com/fields/statuses/14405795048
----------
** I design intricate-yet-elegant processes for user and machine problems.
** Custom development project broken? Contact me, I can help.
** Some of what I do: http://workstuff.tumblr.com/post/70505118/aboutworkstuff

[ http://www.adamfields.com/resume.html ].. Experience
[ http://www.morningside-analytics.com ] .. Latest Venture
[ http://www.confabb.com ] ................ Founder

Re: [resque] cross project resque communication

From:
Karl Baum
Date:
2010-05-22 @ 18:59
Thats an option i would consider, but it would be a bit simpler if it was 
possible with just resque.

thx

Sent from my iPad

On May 22, 2010, at 2:43 PM, Adam Fields <resque534355@aquick.org> wrote:

> On Sat, May 22, 2010 at 08:26:40PM +0200, thibaut.barrere@gmail.com wrote:
>> I do this either by recreating a Job class in the new project, or by  
>> sharing the code between projects.
> 
> You could add a queueing action to an appropriate controller and proxy
> it via an http request.
> 
> -- 
> 				- Adam
> ----------
> If you liked this email, you might also like:
> "Eye-One Display 2 is much better than the Spyder (2, at least)" 
> -- http://workstuff.tumblr.com/post/611906312
> "In praise of the Sous Vide Supreme" 
> -- http://www.aquick.org/blog/2010/05/17/in-praise-of-the-sous-vide-supreme/
> "Brooklyn Botanic Garden" 
> -- http://www.flickr.com/photos/fields/4520236537/
> "fields: Kevin Costner 'oil vacuum' being tested by BP to clean up the 
spill: h..." 
> -- http://twitter.com/fields/statuses/14405795048
> ----------
> ** I design intricate-yet-elegant processes for user and machine problems.
> ** Custom development project broken? Contact me, I can help.
> ** Some of what I do: http://workstuff.tumblr.com/post/70505118/aboutworkstuff
> 
> [ http://www.adamfields.com/resume.html ].. Experience
> [ http://www.morningside-analytics.com ] .. Latest Venture
> [ http://www.confabb.com ] ................ Founder