From 9a9cd361fa470ecfc3fee8bc207ab2a26b057ee7 Mon Sep 17 00:00:00 2001 From: abdulmohsen Date: Tue, 20 Aug 2024 18:51:16 +0300 Subject: [PATCH 1/3] Migrated system:tasks to use the new events system for queue. --- config/config.php | 1 + container/files/init-container.sh | 3 + frontend/pages/events/index.vue | 8 +- frontend/pages/tasks.vue | 4 +- src/API/{Tasks/Index.php => Tasks.php} | 86 +++++---- src/Commands/Events/DispatchCommand.php | 2 +- src/Commands/System/IndexCommand.php | 4 +- src/Commands/System/TasksCommand.php | 230 ++++++++++++++---------- src/Libs/Events/DataEvent.php | 3 + src/Model/Events/EventsRepository.php | 13 +- 10 files changed, 213 insertions(+), 141 deletions(-) rename src/API/{Tasks/Index.php => Tasks.php} (58%) diff --git a/config/config.php b/config/config.php index 08d3a273..9e55e80b 100644 --- a/config/config.php +++ b/config/config.php @@ -299,6 +299,7 @@ return (function () { 'enabled' => true, 'timer' => '* * * * *', 'args' => '-v', + 'hide' => true, ], ], ]; diff --git a/container/files/init-container.sh b/container/files/init-container.sh index f62cbb2e..c21aea7e 100755 --- a/container/files/init-container.sh +++ b/container/files/init-container.sh @@ -88,6 +88,9 @@ fi echo "[$(date +"%Y-%m-%dT%H:%M:%S%z")] Caching tool routes." /opt/bin/console system:routes +echo "[$(date +"%Y-%m-%dT%H:%M:%S%z")] Caching events listeners." +/opt/bin/console events:cache + echo "[$(date +"%Y-%m-%dT%H:%M:%S%z")] Running database migrations." /opt/bin/console system:db:migrations diff --git a/frontend/pages/events/index.vue b/frontend/pages/events/index.vue index d8798430..45341f12 100644 --- a/frontend/pages/events/index.vue +++ b/frontend/pages/events/index.vue @@ -85,7 +85,13 @@ - +