From 8d93a8aa099f74f29d875df4273b2bd244e2b562 Mon Sep 17 00:00:00 2001 From: Fabian Gruber Date: Tue, 6 May 2025 12:20:04 +0200 Subject: [PATCH] tasks: clean all Timers on error & shutdown --- app/cli.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/cli.php b/app/cli.php index 3a4fb844a1..fc658c5ad2 100644 --- a/app/cli.php +++ b/app/cli.php @@ -10,6 +10,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Platform\Appwrite; use Appwrite\Runtimes\Runtimes; use Executor\Executor; +use Swoole\Timer; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\CLI; @@ -286,6 +287,10 @@ $cli 'Task', $taskName, ]); + + Timer::clearAll(); }); +$cli->shutdown()->action(fn () => Timer::clearAll()); + $cli->run();