This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a recurring timer I use, the | |
# the timer should fire till a certain condition | |
# is fulfilled | |
# Caveats - I get Mojo::Reactor::Poll: Timer failed: Missing or empty input | |
# from time to time | |
my ($i, $done, $id) = (0, 0, undef); | |
$id = Mojo::IOLoop->recurring(0.2 => sub { | |
return if ($done); | |
app->log->debug("waiting for $json - $i time"); |