Server tasks should be executed on the master server only.
This commit is contained in:
parent
ffbbb47aba
commit
f8425f0aa7
|
@ -308,9 +308,7 @@ sub pandora_server_tasks ($) {
|
|||
|
||||
# Realtime stats (Only master server!) - ( VERY HEAVY !)
|
||||
# Realtimestats == 1, generated by WEB Console, not by server!
|
||||
if ($pa_config->{"pandora_master"} == 1
|
||||
&& defined($pa_config->{"realtimestats"})
|
||||
&& $pa_config->{"realtimestats"} == 0){
|
||||
if (defined($pa_config->{"realtimestats"}) && $pa_config->{"realtimestats"} == 0){
|
||||
|
||||
# Check if I need to refresh stats
|
||||
my $last_execution_stats = get_db_value ($dbh, "SELECT MAX(utimestamp) FROM tgroup_stat");
|
||||
|
@ -514,8 +512,8 @@ sub main() {
|
|||
# Start the servers
|
||||
pandora_startup ();
|
||||
|
||||
# Start thread to execute server tasks
|
||||
threads->create('pandora_server_tasks', (\%Config))->detach();
|
||||
# Start thread to execute server tasks on the master server
|
||||
threads->create('pandora_server_tasks', (\%Config))->detach() if ($pa_config->{"pandora_master"} == 1);
|
||||
|
||||
# Generate 'going up' events
|
||||
foreach my $server (@Servers) {
|
||||
|
|
Loading…
Reference in New Issue