DtcQueueBundle icon indicating copy to clipboard operation
DtcQueueBundle copied to clipboard

Possibility to receive status or progress of running task?

Open mrvnklm opened this issue 7 years ago • 2 comments

Hey there, I was wondering if its possible to set some kind of progress in the task, which can be read from outside using the task id? Extending the entity to add a entries and processed field seems simple but not sure if this would be the best way of doing this.

I also had a look at other bundles and it seems like its not common to do so, but why?

mrvnklm avatar Jul 21 '18 13:07 mrvnklm

@mrvnklm Just reviewing older issues. Not sure if you're still using the bundle right now, but this is a potential enhancement. The job has a status field such as 'success', 'exception, 'new', 'running', 'failure'.

It wouldn't be terribly hard to have a Progress field - like a counter, that one could update with the progress of the job, but it would have to be done by the job itself as the worker wouldn't have a good way to measure progress, unless it keeps statistics on the type of jobs that it sees and then tries to take a guess based on the average running time of each job. Even then as things are not done in a multi-threaded manner right now, this would involve a separate monitoring task of sorts.

I'm not sure what you had in mind in terms of "entries" and "processed" fields?

mmucklo avatar Jul 26 '19 05:07 mmucklo

@mmucklo not using the bundle anymore, because I switched to Laravel. I thought of a design like https://github.com/imTigger/laravel-job-status for anyone whos further looking, making am PR for that bundle might not be hard work, when you follow what imTigger did

mrvnklm avatar Aug 11 '19 13:08 mrvnklm