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

Active job runtime calculation can be incorrect #1067

Open
alex-ketch opened this issue Mar 10, 2021 · 0 comments
Open

Active job runtime calculation can be incorrect #1067

alex-ketch opened this issue Mar 10, 2021 · 0 comments
Labels

Comments

@alex-ketch
Copy link
Contributor

There seems to be an issue with the job.runtime_seconds calculation which causes the progress bar for file conversions to immediately jump to 100%.

hub/manager/jobs/models.py

Lines 870 to 884 in c8bb8dd

@cached_property
def runtime_seconds(self) -> Optional[float]:
"""
Get the runtime in seconds.
"""
if self.runtime is not None:
return self.runtime
elif self.is_active and self.began:
return (timezone.now() - self.began).seconds
elif self.ended and self.began:
return (self.ended - self.began).seconds
else:
return None

In trying to debug locally, I noticed that the timezones were different between the now and began timestamps.
Screenshot 2021-03-10 at 15 52 52

@alex-ketch alex-ketch added the Bug label Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant