You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a task runs longer than a minute, it will be started again and again (with each "runCommand" execution) until the first one is stopped (and the last execution time is written).
One (maybe dirty) fix would be:
\Ttree\Scheduler\Command\TaskCommandController::runCommand
Switch both lines:
first: write the last execution time $this->taskService->update($task, $taskDescriptor['type']);
then: execute the task $task->execute($this->objectManager);
Let me know what the perfect solution would be and I can help to develop it (if you need help).
PS:
allowParallelExecution of the same task (and not in general) as an option for a task would be cool as feature.
looking forward to "Asynchronous task handling or multi thread (pthread support)" :-) 👍
The text was updated successfully, but these errors were encountered:
I've been also thinking of solving it by implementing allowParallelExecution on task level in combination with a status flag running which is also a suggestion here: #15
@dfeyer does this makes sense? If yes, I'm happy to add this.
Edit: I kind of realised that it's not that simple to implement this two features nicely. Therefore I just fixed the main issue here. See PR #26
If a task runs longer than a minute, it will be started again and again (with each "runCommand" execution) until the first one is stopped (and the last execution time is written).
One (maybe dirty) fix would be:
\Ttree\Scheduler\Command\TaskCommandController::runCommand
Switch both lines:
first: write the last execution time
$this->taskService->update($task, $taskDescriptor['type']);
then: execute the task
$task->execute($this->objectManager);
Let me know what the perfect solution would be and I can help to develop it (if you need help).
PS:
allowParallelExecution of the same task (and not in general) as an option for a task would be cool as feature.
looking forward to "Asynchronous task handling or multi thread (pthread support)" :-) 👍
The text was updated successfully, but these errors were encountered: