support for multiples of the same action in schedule config
This commit is contained in:
11
Changes
11
Changes
@@ -1,3 +1,9 @@
|
|||||||
|
2.039010 -
|
||||||
|
|
||||||
|
[NEW FEATURES]
|
||||||
|
|
||||||
|
* support for multiples of the same action in schedule config
|
||||||
|
|
||||||
2.039009 - 2018-02-22
|
2.039009 - 2018-02-22
|
||||||
|
|
||||||
[NEW FEATURES]
|
[NEW FEATURES]
|
||||||
@@ -10,10 +16,13 @@
|
|||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|
||||||
* handle malformed IPs in c_ip results
|
|
||||||
* larger port status icons in Device Ports view
|
* larger port status icons in Device Ports view
|
||||||
* --quiet mode for netdisco-do
|
* --quiet mode for netdisco-do
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* handle malformed IPs in c_ip results
|
||||||
|
|
||||||
2.039007 - 2018-02-16
|
2.039007 - 2018-02-16
|
||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|||||||
@@ -62,16 +62,17 @@ sub worker_body {
|
|||||||
foreach my $action (keys %{ setting('schedule') }) {
|
foreach my $action (keys %{ setting('schedule') }) {
|
||||||
my $sched = setting('schedule')->{$action}
|
my $sched = setting('schedule')->{$action}
|
||||||
or next;
|
or next;
|
||||||
|
my $real_action = ($sched->{action} || $action);
|
||||||
|
|
||||||
# next occurence of job must be in this minute's window
|
# next occurence of job must be in this minute's window
|
||||||
debug sprintf "sched ($wid): $action: win_start: %s, win_end: %s, next: %s",
|
debug sprintf "sched ($wid): $real_action: win_start: %s, win_end: %s, next: %s",
|
||||||
$win_start, $win_end, $sched->{when}->next_time($win_start);
|
$win_start, $win_end, $sched->{when}->next_time($win_start);
|
||||||
next unless $sched->{when}->next_time($win_start) <= $win_end;
|
next unless $sched->{when}->next_time($win_start) <= $win_end;
|
||||||
|
|
||||||
# queue it!
|
# queue it!
|
||||||
info "sched ($wid): queueing $action job";
|
info "sched ($wid): queueing $real_action job";
|
||||||
jq_insert({
|
jq_insert({
|
||||||
action => $action,
|
action => $real_action,
|
||||||
device => $sched->{device},
|
device => $sched->{device},
|
||||||
port => $sched->{port},
|
port => $sched->{port},
|
||||||
extra => $sched->{extra},
|
extra => $sched->{extra},
|
||||||
|
|||||||
Reference in New Issue
Block a user