Hi
On Dec 23, 2007 3:05 AM, Nathan Esquenazi
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> If I have a worker and everything set up and I call:
>
> MiddleMan.ask_status(:worker => :foo_worker)
> MiddleMan.ask_status(:worker => :foo_worker)
> MiddleMan.ask_status(:worker => :foo_worker)
You are not asking a worker to do something, you are just asking the
status and it won''t hit the worker at all. Perhaps you meant:
MiddleMan.ask_work(:worker => :foo_worker, :worker_method =>
:send_mails, :data => @selected_users.map(&:id))
>
> three times in quick succession. Will the tasks be queued up and
> executed as the previous one finishes? Or is this going to ignore the 2
> bottom requests? How does this work?
>
> Do I absolutely need to set job_keys in the situation in which the
> worker may be called by multiple users at once?
Depends on, how you want to handle it. If you want the requests to be
queued when multiple users hit it, you don''t have to do anything and
your requests will be queued by default.
But, if you want to process them concurrently, then you can use
inbuilt thread pool. You can join backgroundrb mailing list for more
information.
--
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.
http://gnufied.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---