mirror of https://github.com/mikaku/Monitorix.git
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:
parent
97669bfe65
commit
8f7deef03f
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue