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
Add duration property to completed jobs #534
Comments
You have properties on the Job class for all this: |
done 86e663b |
Thanks, this helps, but is still not what we are after. I think the timestamp is a And can you please clarify further, what is the difference between "timetamp when the job was processed" and "timestamp when the job was completed"? What does the life cycle look like? When is a job processed vs completed? I think for now, we will still manually track the duration of the job as it seems more reliable and precise, and captures the actual execution time of the task.
|
Using hrtime would be an improvement but it is a breaking change. Maybe the problem is the wording here, onProcessed is the timestamp when the job starts to be processed. onCompleted - onProcessed = processing time. |
but of course we could add a new sets of properties ending in hr for the high resolution version like onProcessedHr, etc. |
Yes that would be great. Personally I would also rename the properties to be a bit clearer, as it's quite confusing if you don't know BullMQ well. E.g. |
Hello! Just to add that I support this change, the current wording is confusing, and a property |
It would be nice if jobs would track how long they took to execute. If they already do, that's great, but it wasn't obvious from the docs or the properties on the job object how they do that.
Suggestion:
Currently doing this manually, but it would be nice if this was implemented in bullmq internally.
The text was updated successfully, but these errors were encountered: