aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/QueueWorker.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-04-14 09:21:33 +0200
committerMario Vavti <mario@mariovavti.com>2023-04-14 09:21:33 +0200
commitd8811b499d5aa2559ec13862a27f70404206e0c5 (patch)
tree5dd68237e02554aa094462fb026fc366ca607799 /Zotlabs/Lib/QueueWorker.php
parent20f4538db4fdfe74c060670caf46a754f856313e (diff)
downloadvolse-hubzilla-d8811b499d5aa2559ec13862a27f70404206e0c5.tar.gz
volse-hubzilla-d8811b499d5aa2559ec13862a27f70404206e0c5.tar.bz2
volse-hubzilla-d8811b499d5aa2559ec13862a27f70404206e0c5.zip
improved item_expire()
Diffstat (limited to 'Zotlabs/Lib/QueueWorker.php')
-rw-r--r--Zotlabs/Lib/QueueWorker.php7
1 files changed, 6 insertions, 1 deletions
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)");
}