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

Flush logs before status is complete #63

Closed
manthey opened this issue Aug 26, 2016 · 5 comments
Closed

Flush logs before status is complete #63

manthey opened this issue Aug 26, 2016 · 5 comments

Comments

@manthey
Copy link
Member

manthey commented Aug 26, 2016

Currently, the job status can change to a completed state (error, success, or cancelled) without the logs being fully flushed.

@zachmullen
Copy link
Member

This line in __exit__ takes care of ensuring logs are flushed once the task is complete.

@manthey
Copy link
Member Author

manthey commented Aug 26, 2016

Right, but the status is changed BEFORE the logs are flushed. Specifically, if you are listening for girder events where the log is updated, you can get a job whose status is completed but logs aren't flushed. This was surprising, as in a test I expected an error message to be in the logs when the error status was set (but it wasn't there yet).

@manthey
Copy link
Member Author

manthey commented Aug 26, 2016

I would recommend adding self._flush() in updateStatus before the status request is made.

@zachmullen
Copy link
Member

I'm fine with that change.

@manthey
Copy link
Member Author

manthey commented Aug 29, 2016

Added in PR #65.

@manthey manthey closed this as completed Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants