FroshTools icon indicating copy to clipboard operation
FroshTools copied to clipboard

Make statuses configurable in TaskChecker

Open alessandroaussems opened this issue 1 year ago • 1 comments

Please describe the feature you would like to see implemented.

Often we move a scheduled task that has an console command equivalent to crontab of the server. Since crontab is easier to monitor and more reliable than the Shopware scheduled tasks with the scheduled_task table.

If we do so we assign the scheduled_task the status 'crontab' to indicate the process runs from crontab.

It would be nice if the statuses you want to ignore are configurable.

Pseudo code:

$data = $this->connection->createQueryBuilder()
      ->select('s.scheduled_task_class', 's.next_execution_time')
      ->from('scheduled_task', 's')
      ->where('s.status NOT IN(:status)')
      ->setParameter('status', $this->configService->getArray('FroshTools.config.monitorTaskList'), ArrayParameterType::STRING)
      ->fetchAllAssociative();

alessandroaussems avatar Aug 14 '24 07:08 alessandroaussems

Why don't set the status to inactive + change the next execution time to something in the far future when you use to console command?

inactive is supported by both core and this plugin

MelvinAchterhuis avatar Aug 14 '24 19:08 MelvinAchterhuis

See melvin answer

shyim avatar Nov 15 '24 12:11 shyim