2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

93_DbRep: minor fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@25603 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2022-01-31 22:23:55 +00:00
parent e10519635a
commit 0bb49be5eb

View File

@ -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