Hi.
Den fredag 2. mai 2014 skrev Richard Sugg <[email protected]> følgende:
> 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?
>
> If you are running this on a Unix-platform: use a cron job. Don't bother
the application to do regular maintenance tasks.
--
Pelle
Research is what I'm doing when I don't know what I'm doing.
- Wernher von Braun
--
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.