Skip to content

Commit

Permalink
pre release version
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanto committed Aug 12, 2024
1 parent a933fea commit b126d42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"runtime" : {
"requires" : {
"Algorithm::Cron" : "0.10",
"Mojolicious" : "9.35",
"Mojolicious" : "9.37",
"perl" : "5.020001"
}
},
Expand Down Expand Up @@ -73,6 +73,7 @@
"Daniel Mantovani <[email protected]>",
"Mohammad S Anwar <[email protected]>",
"Sébastien Feugère <[email protected]>",
"rawleyfowler <[email protected]>",
"vagrant <[email protected]>"
],
"x_serialization_backend" : "JSON::PP version 4.07",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ of simultaneous scheduled tasks to just one on a multi-host environment.
# Execute some job every 5 minutes, only on one of the existing hosts

plugin Cron => ( '*/5 * * * *' => sub {
my $target_epoch = shift;
my ($target_epoch, $app) = @_;
my $last_epoch = some_kind_of_atomic_swap_function(
key => "some id key for this crontab",
value => $target_epoch
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojolicious/Plugin/Cron.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ sub register {

# special case, plugin => 'mm hh dd ...' => sub {}
$self->_cron($app->moniker,
{crontab => (keys %$cronhashes)[0], code => (values %$cronhashes)[0]}, $app);
{crontab => (keys %$cronhashes)[0], code => (values %$cronhashes)[0]},
$app);
}
else {
$self->_cron($_, $cronhashes->{$_}, $app) for keys %$cronhashes;
Expand Down

0 comments on commit b126d42

Please sign in to comment.