mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #9727 from appwrite/PLA-2826-1
tasks: clean all Timers on error & shutdown
This commit is contained in:
commit
f841979de8
1 changed files with 5 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ use Appwrite\Event\StatsUsage;
|
||||||
use Appwrite\Platform\Appwrite;
|
use Appwrite\Platform\Appwrite;
|
||||||
use Appwrite\Runtimes\Runtimes;
|
use Appwrite\Runtimes\Runtimes;
|
||||||
use Executor\Executor;
|
use Executor\Executor;
|
||||||
|
use Swoole\Timer;
|
||||||
use Utopia\Cache\Adapter\Sharding;
|
use Utopia\Cache\Adapter\Sharding;
|
||||||
use Utopia\Cache\Cache;
|
use Utopia\Cache\Cache;
|
||||||
use Utopia\CLI\CLI;
|
use Utopia\CLI\CLI;
|
||||||
|
|
@ -286,6 +287,10 @@ $cli
|
||||||
'Task',
|
'Task',
|
||||||
$taskName,
|
$taskName,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Timer::clearAll();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$cli->shutdown()->action(fn () => Timer::clearAll());
|
||||||
|
|
||||||
$cli->run();
|
$cli->run();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue