In my app, I use

Mojo::IOLoop->recurring( 1800 => sub {
    # update the database from another data source
});

This doesn't need to be run by each worker, it only needs to be done once 
within the application. I thought I could just make it a singleton like

Mojo::IOLoop->singleton->recurring( 1800 => sub {
    # update the database from another data source
});

but it still runs once per worker. How can I get this loop to be run once 
each 1800 seconds, not once per worker every 1800 seconds?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to