Updating the rrd needs to have the exculsive lock and emailreports do not need

to have a lock as it just creates an cgi request which has its own lock.
This commit is contained in:
Andreas Bachlechner 2022-02-23 13:23:43 +01:00
parent 97669bfe65
commit 8f7deef03f
1 changed files with 1 additions and 3 deletions

View File

@ -769,7 +769,7 @@ while(1) {
# call to all enabled graphs on every minute
if($sec == 0) {
my $lockfile_handler = lockfile_handler(\%config);
global_flock($lockfile_handler, LOCK_SH);
global_flock($lockfile_handler, LOCK_EX);
foreach my $f (@{$config{func_update}}) {
my $update = $f . "_update";
my $d = $f;
@ -832,7 +832,6 @@ while(1) {
next;
}
global_flock($lockfile_handler, LOCK_SH);
# daily
if(lc($emailreports->{daily}->{enabled} || "") eq "y") {
eval { emailreports::emailreports_send(\%config, "daily", "1day", $d); };
@ -870,7 +869,6 @@ while(1) {
}
}
}
global_flock($lockfile_handler, LOCK_UN);
}
}