mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_freezemon.pm: Bugfix: Avoid unnecessary blockingCall
git-svn-id: https://svn.fhem.de/fhem/trunk@16410 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a27d227dd0
commit
000a60331b
@ -22,6 +22,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
# Changelog:
|
||||
# 0.0.18: fixed unnecessary call of blocking function
|
||||
# 0.0.17: fixed Warning when fm_logFile is not maintained
|
||||
# Freeze-Handling non-blocking
|
||||
# New attribute fm_whitelistSub
|
||||
@ -84,7 +85,7 @@ use Time::HiRes qw(tv_interval);
|
||||
use B qw(svref_2object);
|
||||
use Blocking;
|
||||
|
||||
my $version = "0.0.17";
|
||||
my $version = "0.0.18";
|
||||
my @logqueue = ();
|
||||
|
||||
###################################
|
||||
@ -174,11 +175,9 @@ sub freezemon_Notify($$) {
|
||||
###################################
|
||||
sub freezemon_processFreeze($) {
|
||||
|
||||
#my ($name) = @_;
|
||||
my ($hash) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
#my $hash = $defs{$name};
|
||||
my $log = freezemon_dump_log( $hash, $hash->{helper}{TIMER}, $hash->{helper}{msg} );
|
||||
|
||||
return $name;
|
||||
@ -323,12 +322,16 @@ sub freezemon_ProcessTimer($) {
|
||||
|
||||
my @t = localtime($seconds);
|
||||
my $log = ResolveDateWildcards( AttrVal( $name, "fm_logFile", undef ), @t );
|
||||
$hash->{helper}{logfile} = $log;
|
||||
|
||||
$hash->{helper}{blocking} =
|
||||
BlockingCall( "freezemon_processFreeze", $hash, "freezemon_freezeDone", 300, "freezemon_freezeAbort",
|
||||
$hash );
|
||||
Log3 $name, 5, "[Freezemon] $name: Blocking Call started with PID " . $hash->{helper}{blocking}{pid};
|
||||
# BlockingCall for Logfile creation
|
||||
if ( AttrVal( $name, "fm_logFile", "" ) ne "" ) {
|
||||
$hash->{helper}{logfile} = $log;
|
||||
|
||||
$hash->{helper}{blocking} =
|
||||
BlockingCall( "freezemon_processFreeze", $hash, "freezemon_freezeDone", 300, "freezemon_freezeAbort",
|
||||
$hash );
|
||||
Log3 $name, 5, "[Freezemon] $name: Blocking Call started with PID " . $hash->{helper}{blocking}{pid};
|
||||
}
|
||||
|
||||
Log3 $name, $loglevel, $hash->{helper}{msg};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user