Tx John
was expecting a Rails "application" to run in a way but indeed it is just
an http server running as wa daemon.
So
namespace :ruote do
  desc "Run a worker thread for ruote"
  task :run_worker => :environment do
       Process.daemon
       RuoteKit.run_worker(RUOTE_STORAGE)
  end
end
works well apparently, could had some signal traps but not sure how the
Worker would react in any case as it does not seems to handle signals.
Did not specify to stay in the current directory, but no worries apparently.
Could have run the rake task with "nohup &" too, hard way I find.
Cheers
Christophe

On 20 June 2012 12:01, John Mettraux <[email protected]> wrote:

>
> On Wed, Jun 20, 2012 at 02:50:19AM -0700, Christophe Malaurie wrote:
> >
> > Using ruote+ruotekit template, and no process starts when running:
> > > rails s -d (which is letting Rails Webrick server running as as daemon)
> >
> > So in that mode none worker is running. Is there something I do not get
> > about ruby threads ? Even in development environment it is a bit of a
> pain
> > to get a terminal running permanently in order to have the workflow
> > processed.
> >
> > I'm using ruote 2.2.0 on Debian.
> > Everything fine when running
> > > rails s (but you have to let a terminal opened)...
> > I saw the rake task:run_worker comment but again you cannot daemonize..
>
> Hello Christophe,
>
> there are lots of daemonization toolkits available. For example:
>
>  https://github.com/kennethkalmer/daemon-kit
>
> There is also Process.daemon() available in Ruby 1.9.x
>
> There are also tools like foreman that help you manage your
> daemons/servers:
>
>  https://github.com/kennethkalmer/daemon-kit
>
> Please tell me if this doesn't answer your question.
>
>
> Kind regards,
>
> --
> John Mettraux - http://lambda.io/jmettraux
>
> --
> 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 "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

Reply via email to