diff options
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 03ab43a23..097c4cbd6 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -5517,10 +5517,9 @@ sub check_pgagent_jobs { : $critical ? 1 : 0; # Determine max time to examine. - my $seconds = do { - no warnings; - $warning > $critical ? $warning : $critical; - }; + my $seconds = $critical; + $seconds = $warning if length $warning and + (! length $critical or $warning > $critical); $SQL = qq{ SELECT jlog.jlgid |