diff options
author | Christian Hesse <mail@eworm.de> | 2023-02-02 11:08:43 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-02-02 11:24:45 +0100 |
commit | 82003bc7d139b4fd68ba0fdf32e837852b42edbc (patch) | |
tree | 026d97200988b1b0b59b82469fc5cb636af4949f | |
parent | 978c03131a905c1a6892c9d2fbb049256af2c263 (diff) |
telegram-chat: allow to modify the time to wait for command
For now this is a hidden settings... Do we want this to be documented?
-rw-r--r-- | telegram-chat | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/telegram-chat b/telegram-chat index 2d3cee6..4a78da4 100644 --- a/telegram-chat +++ b/telegram-chat @@ -16,9 +16,11 @@ :global TelegramChatId; :global TelegramChatIdsTrusted; :global TelegramChatOffset; +:global TelegramChatRunTime; :global TelegramTokenId; :global CertificateAvailable; +:global EitherOr; :global EscapeForRegEx; :global GetRandom20CharAlNum; :global IfThenElse; @@ -103,7 +105,7 @@ $WaitFullyConnected; $LogPrintExit2 info $0 ("Running command: " . $Text) false; :exec script=(":do {\n" . $Text . "\n} on-error={ :execute script=\":put\" file=" . $File . ".failed };" . \ ":execute script=\":put\" file=" . $File . ".done") file=$File; - :if ([ $WaitForFile ($File . ".done.txt") 20s ] = false) do={ + :if ([ $WaitForFile ($File . ".done.txt") [ $EitherOr $TelegramChatRunTime 20s ] ] = false) do={ :set State "The command did not finish, still running in background.\n\n"; } :if ([ :len [ /file/find where name=($File . ".failed.txt") ] ] > 0) do={ |