From d8811b499d5aa2559ec13862a27f70404206e0c5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 14 Apr 2023 09:21:33 +0200 Subject: improved item_expire() --- Zotlabs/Lib/QueueWorker.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/QueueWorker.php b/Zotlabs/Lib/QueueWorker.php index a1c13ef8a..1c74b42d8 100644 --- a/Zotlabs/Lib/QueueWorker.php +++ b/Zotlabs/Lib/QueueWorker.php @@ -24,7 +24,8 @@ class QueueWorker { // Exceptions for processtimeout ($workermaxage) value. // Currently the value is overriden with 3600 seconds (1h). public static $long_running_cmd = [ - 'Queue' + 'Queue', + 'Expire' ]; private static function qstart() { @@ -147,6 +148,10 @@ class QueueWorker { ); if ($r) { + // TODO: some long running services store their pid in config.procid.daemon + // we could possibly check if a pid exist and check if the process is still alive + // prior to reseting workerq_reservationid + $ids = ids_to_querystr($r, 'workerq_id'); $u = dbq("update workerq set workerq_reservationid = null where workerq_id in ($ids)"); } -- cgit v1.2.3