mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-21 03:14:58 +00:00
Update/fix pt-agent to work with new Service.run_schedule and Service.spool_schedule attribs.
This commit is contained in:
@@ -4951,8 +4951,9 @@ sub make_new_crontab {
|
||||
: `crontab -l 2>/dev/null`;
|
||||
|
||||
my @other_lines
|
||||
= grep { $_ !~ m/pt-agent --run-service/ }
|
||||
= grep { $_ !~ m/pt-agent (?:--run-service|--send-data)/ }
|
||||
split("\n", $crontab_list);
|
||||
PTDEBUG && _d('Other crontab lines:', \@other_lines);
|
||||
|
||||
my @pt_agent_lines;
|
||||
foreach my $service ( @$services ) {
|
||||
@@ -4968,6 +4969,7 @@ sub make_new_crontab {
|
||||
. $service->name;
|
||||
}
|
||||
}
|
||||
PTDEBUG && _d('pt-agent crontab lines:', \@pt_agent_lines);
|
||||
|
||||
my $new_crontab = join("\n", @other_lines, @pt_agent_lines) . "\n";
|
||||
|
||||
|
Reference in New Issue
Block a user