Ah, shoot. That kicks off for every worker process. Any way to do something where it runs just in the manager process?
On Fri, Nov 23, 2018 at 8:10 PM Stefan Adams <[email protected]> wrote: > Ah! How cool! Thank you for that! That's gives me better context now > for understanding the purpose and value of next_tick. :) > > On Fri, Nov 23, 2018 at 8:04 PM Dan Book <[email protected]> wrote: > >> You can set up code to be run whenever the ioloop is started, which >> happens in each worker process when it starts in a prefork server, by >> adding a next_tick callback as indicated here: >> https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Pre-forking >> >> -Dan >> >> On Fri, Nov 23, 2018 at 6:24 PM Stefan Adams <[email protected]> wrote: >> >>> Sometimes it would be nice to have an event / hook for after the server >>> has started. Specifically, I'd want to kick off an automated process with >>> Mojo::IOLoop->timer|recurring but only after the web server has started. >>> >>> Is this possible? And if not, is it a Pull Request that would be >>> considered? >>> >>> -- >>> 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 https://groups.google.com/group/mojolicious. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> 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 https://groups.google.com/group/mojolicious. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
