Make sense. Thanks. Demonize the worker script seems way to go. ruote-kit 
provides example of integration with rails and it helps us to understand 
how integration works.

If worker is demonized, then it can not be launched from rails app (or any 
other app) and can not be on demand. Not sure how ruote is going to 
interact with the main app (could be rails or other app) when demand 
increases.

On Friday, June 21, 2013 10:59:33 PM UTC-5, marsbomber wrote:
>
> Divide and conquer, my friend. 
>
> You already discovered the rake task that can run the ruote worker, run 
> that as a separate background task, maybe using Foreman.
>
> For me, I'll make sure the ruote-kit initializer .rb file does NOT run the 
> Ruote worker. This means if my Rails app dies, my Ruote workflow will not 
> be interrupted (well, hopefully :D)
>
> RuoteKit ships with a Rake app, which you can use to easily query the 
> Ruote engine to get its work load ... More jobs means more workers? No?
>
> On Saturday, 22 June 2013 08:48:00 UTC+10, emc_lab wrote:
>>
>> Ruote-kit gives option to define a worker outside of rails app. In its 
>> "running workers" at *https://github.com/kennethkalmer/ruote-kit, it 
>> says:
>>
>> *
>>
>>   To run a worker you need to setup a worker script similar to the rake 
>> task example below:
>>
>>   require 'rake'  require 'ruote-kit'
>>   desc "Run a ruote-kit worker"  task :ruote_kit_worker do
>>
>>     RuoteKit.run_worker(Ruote::FsStorage.new('ruote_work'))  end
>>
>> There is a ruote.rake of above which is automatically saved into lib/tasks. 
>> Since there is NO worker instantiated 
>> in rails initialization and we know ruote engine needs at least one worker 
>> running at any time:
>>
>> 1. when and how (by Rake::Task['ruote'].invoke in rails app?) in rails app, 
>> ruote.rake should be called to instantiate a worker? 
>>    Or worker only needs to be instantiated once for the rails app. 
>>   (For worker within a ruote engine, worker is created in rails initializers 
>> along with ruote engine).
>> 2. Does rails app need to kill the worker after the required data processing 
>> is done? Or just leave it running for next request.
>> 3. In which situation does rails app need more than one worker instance?
>>
>> Thanks for help!
>>
>>

-- 
-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to