From cf3b29b959a02076cf1db453f47846ea0ee1e102 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Mon, 31 Jan 2022 22:23:55 +0000 Subject: [PATCH] 93_DbRep: minor fixes git-svn-id: https://svn.fhem.de/fhem/trunk@25603 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/93_DbRep.pm | 58 ++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index f72bc3e1f..dd46e300e 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -347,6 +347,8 @@ my %dbrep_hmainf = ( sumValue => { fn => "DbRep_sumval", fndone => "DbRep_sumvalDone", fnabort => "DbRep_ParseAborted", timeset => 1, table => "history" }, countEntries => { fn => "DbRep_count", fndone => "DbRep_countDone", fnabort => "DbRep_ParseAborted", timeset => 1 }, sqlCmd => { fn => "DbRep_sqlCmd", fndone => "DbRep_sqlCmdDone", fnabort => "DbRep_ParseAborted", timeset => 1 }, + sqlCmdHistory => { fn => "DbRep_sqlCmd", fndone => "DbRep_sqlCmdDone", fnabort => "DbRep_ParseAborted", timeset => 1 }, + sqlSpecial => { fn => "DbRep_sqlCmd", fndone => "DbRep_sqlCmdDone", fnabort => "DbRep_ParseAborted", timeset => 1 }, averageValue => { fn => "DbRep_averval", fndone => "DbRep_avervalDone", fnabort => "DbRep_ParseAborted", timeset => 1, table => "history" }, fetchrows => { fn => "DbRep_fetchrows", fndone => "DbRep_fetchrowsDone", fnabort => "DbRep_ParseAborted", timeset => 1 }, maxValue => { fn => "DbRep_maxval", fndone => "DbRep_maxvalDone", fnabort => "DbRep_ParseAborted", timeset => 1, table => "history" }, @@ -2720,6 +2722,34 @@ sub DbRep_Main { # # $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_sqlCmd", $params, "DbRep_sqlCmdDone", $to, "DbRep_ParseAborted", $hash); # } +# elsif ($opt eq "sqlCmdHistory") { +# $params = { +# hash => $hash, +# name => $name, +# opt => $opt, +# prop => $prop, +# device => $device, +# reading => $reading, +# rsf => $runtime_string_first, +# rsn => $runtime_string_next +# }; +# +# $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_sqlCmd", $params, "DbRep_sqlCmdDone", $to, "DbRep_ParseAborted", $hash); +# } +# elsif ($opt eq "sqlSpecial") { # Execute a special sql command +# $params = { +# hash => $hash, +# name => $name, +# opt => $opt, +# prop => $prop, +# device => $device, +# reading => $reading, +# rsf => $runtime_string_first, +# rsn => $runtime_string_next +# }; +# +# $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_sqlCmd", $params, "DbRep_sqlCmdDone", $to, "DbRep_ParseAborted", $hash); +# } if ($opt eq "delDoublets") { $params = { hash => $hash, @@ -2766,34 +2796,6 @@ sub DbRep_Main { $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_del", $params, "DbRep_del_Done", $to, "DbRep_ParseAborted", $hash); } - elsif ($opt eq "sqlCmdHistory") { - $params = { - hash => $hash, - name => $name, - opt => $opt, - prop => $prop, - device => $device, - reading => $reading, - rsf => $runtime_string_first, - rsn => $runtime_string_next - }; - - $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_sqlCmd", $params, "DbRep_sqlCmdDone", $to, "DbRep_ParseAborted", $hash); - } - elsif ($opt eq "sqlSpecial") { # Execute a special sql command - $params = { - hash => $hash, - name => $name, - opt => $opt, - prop => $prop, - device => $device, - reading => $reading, - rsf => $runtime_string_first, - rsn => $runtime_string_next - }; - - $hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_sqlCmd", $params, "DbRep_sqlCmdDone", $to, "DbRep_ParseAborted", $hash); - } elsif ($opt =~ /syncStandby/ ) { DbRep_beforeproc($hash, "syncStandby"); # Befehl vor Procedure ausführen