From 4814d20dceb145a5772abd141edc96d5e7ef61fe Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 25 Nov 2015 13:21:02 +0300 Subject: [PATCH] Fix. cleanup old tasks. --- resources/install/scripts/fax_queue/tasks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/install/scripts/fax_queue/tasks.lua b/resources/install/scripts/fax_queue/tasks.lua index b3827a9051..bb09ffb295 100644 --- a/resources/install/scripts/fax_queue/tasks.lua +++ b/resources/install/scripts/fax_queue/tasks.lua @@ -14,7 +14,7 @@ elseif database.type == 'mysql' then now_add_sec_sql = "DATE_ADD(UTC_TIMESTAMP(), INTERVAL %s SECOND)" elseif database.type == 'sqlite' then date_utc_now_sql = "datetime('now')" - now_add_sec_sql = "datetime('now', '+%s seconds')" + now_add_sec_sql = "datetime('now', '%s seconds')" else error("unsupported database type: " .. database.type) end @@ -96,7 +96,7 @@ local release_stuck_tasks_sql = [[ update v_fax_tasks set task_status = 0, task_lock_time = NULL, task_next_time = ]] .. date_utc_now_sql .. [[ - where task_lock_time < ]] .. now_add_sec_sql:format('3600') .. [[ + where task_lock_time < ]] .. now_add_sec_sql:format('-3600') .. [[ ]] local remove_finished_tasks_sql = [[