It is currently being started from environment.rb.
I remove the 'metaphoore' file before (re)starting the mongrel
cluster.
Then, in the scheduler.rb I check for the 'metaphore' file.
If i doesn't exist, it starts the scheduler and creates the file.
The 'metaphore' file is just an empty file in my tmp dir.
Metaphore stands for a signalling file.
This setup works fine, when all mongrels are on one server.
Otherwise you should put the signal somewhere all mongrels can see it,
like memcached or the database.



On Jul 26, 4:40 pm, "Lee Fyock" <[EMAIL PROTECTED]> wrote:
> So, where inside your application do you start the scheduler? Inside
> application.rb?
> In case you can't tell from my questions, we have a similar configuration
> (multiple mongrel instances) and I'm thinking of using OpenWFEru for some
> periodic tasks.
>
> Thanks!
> Lee
>
> On 7/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > You can start it from the environment.rb, yes, but you need to remove
> > the semaphore file before starting he mongrels.
> > This cannot be done from within the environment.rb because each
> > mongrel starts its own process.
>
> > I want to have the scheduler inside my Rails application.
> > I could run it using script/runner but then I have to maintain another
> > process.
> > This way the scheduler is stopped when I stop the application and vice-
> > versa.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to