-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Correctly calculate Job.started_at
/Job.finished_at
#655
Conversation
Since before_docker_run/after_docker_run were called respenctively before/after setting the status and started_at/finished_at, it was causing timing issues in tests and not only.
f097692
to
515f76a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail - Should I take over fixing the tests? - is what I am doing on #650 too at the moment (in the waiting rooms ;)
If it's blocking - go ahead. The fix should be easy - the |
docker-app/worker_wrapper/wrapper.py
Outdated
# only successfully finished packaging jobs should update the Project.data_last_packaged_at | ||
if self.job.status == Job.Status.FINISHED: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check was never necessary, as before the job.status = Job.status.FINISHED
was set right before calling after_docker_run
.
docker-app/worker_wrapper/wrapper.py
Outdated
for job in Job.objects.filter( | ||
type=Job.Type.PACKAGE, | ||
) | ||
.exclude(id=self.job_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before self.job was excluded with FINISHED
jobs. Now need to exclude seperately.
Since
before_docker_run
/after_docker_run
were called respenctively before/after setting the status andstarted_at
/finished_at
, it was causing timing issues in tests and not only.This PR is aiming at fixing this.
TODO: