Skip to content

Commit

Permalink
Porting #5277 - Do not process boost if no items to process
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Apr 1, 2023
1 parent 9e2f060 commit 9707f97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -58,6 +58,7 @@ Cacti CHANGELOG
-feature: Upgrade d3.js to version 7.8.2

1.2.25
-issue#5277: Boost should not attempt to start if there are no poller_output_boost records
-issue#5279: Rebuild poller cache does not work as expected
-issue#5282: Script ss_host_cpu.php does not work as expected when on a remote data collector with hmib enabled
-issue#5283: Trying to access array offset on value of type null in file lib/functions.php on line: 2276
Expand Down
9 changes: 9 additions & 0 deletions poller_boost.php
Expand Up @@ -146,6 +146,15 @@
$run_now = boost_time_to_run($forcerun, $current_time, $last_run_time, $next_run_time);

if ($run_now) {
/**
* Check to see if there are any poller items to process and if not
* exit cleanly
*/
$poller_items = db_fetch_cell('SELECT * FROM poller_output_boost LIMIT 1');
if ($poller_items == 0) {
exit(0);
}

/* we will warn if the process is taking extra long */
if (!register_process_start('boost', 'master', $config['poller_id'], read_config_option('boost_rrd_update_max_runtime') * 3)) {
exit(0);
Expand Down

0 comments on commit 9707f97

Please sign in to comment.