Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ruote on Rails : worker not starting when rails server daemonized
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christophe Malaurie  
View profile  
 More options Jun 20 2012, 5:50 am
From: Christophe Malaurie <christophe.malau...@gmail.com>
Date: Wed, 20 Jun 2012 02:50:19 -0700 (PDT)
Local: Wed, Jun 20 2012 5:50 am
Subject: Ruote on Rails : worker not starting when rails server daemonized

Hi all
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..

Tx and Cheers
Christophe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Mettraux  
View profile  
 More options Jun 20 2012, 6:01 am
From: John Mettraux <jmettr...@gmail.com>
Date: Wed, 20 Jun 2012 19:01:15 +0900
Local: Wed, Jun 20 2012 6:01 am
Subject: Re: [ruote:3631] Ruote on Rails : worker not starting when rails server daemonized

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Malaurie  
View profile  
 More options Jun 20 2012, 12:36 pm
From: Christophe Malaurie <christophe.malau...@gmail.com>
Date: Wed, 20 Jun 2012 18:36:01 +0200
Local: Wed, Jun 20 2012 12:36 pm
Subject: Re: [ruote:3631] Ruote on Rails : worker not starting when rails server daemonized

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 <jmettr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »