Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make statuses configurable in TaskChecker #270

Open
alessandroaussems opened this issue Aug 14, 2024 · 1 comment
Open

Make statuses configurable in TaskChecker #270

alessandroaussems opened this issue Aug 14, 2024 · 1 comment

Comments

@alessandroaussems
Copy link

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();
@MelvinAchterhuis
Copy link
Member

MelvinAchterhuis commented Aug 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants