Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Under what conditions does finishedOn property is null #601

Closed
pmadhavan opened this issue Jun 17, 2021 · 1 comment
Closed

Under what conditions does finishedOn property is null #601

pmadhavan opened this issue Jun 17, 2021 · 1 comment

Comments

@pmadhavan
Copy link

I am trying to track metrics around time taken to process a job or duration of the job staring from when it was picked to when it was completed. I use the properties finishedOn and processedOn to calculate the same (job.finishedOn - job.processedOn), but most of the time the finishedOn property returns null.

Since the property is nullable, I am doing something like job.finishedOn || Date.now() - job.processedOn as a workaround in the onWorkerComplete method.

Job should either be completed or failed, curious to know why would finishedOn property would be null?

@manast
Copy link
Contributor

manast commented Jun 18, 2021

finishedOn is set when a job completes or fails, so if that if the case it cannot be null unless there is a bug somewhere.

@manast manast closed this as completed Jun 18, 2021
@taskforcesh taskforcesh locked and limited conversation to collaborators Jun 18, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants