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

RQ Job Timeout Handling #223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JVickery-TBS
Copy link
Contributor

fix(logic): close temp file on rq timeout;

  • Always close the temp file on exception handling.
  • Added handling for the rq job timeout.

- Always close the temp file on exception handling.
- Added handling for the rq job timeout.
@@ -222,6 +222,11 @@ def tabulator_load():
resource_id=resource['id'],
mimetype=resource.get('format'),
logger=logger)
except rq_timeouts.JobTimeoutException as e:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to put this further out, eg line 256?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThrawnCA moved out to wrap the tabulator_load method call with the try/catch. Lemme know if that is actually the right place. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a start, but I think line 267 would be a better place.

- Moved try/catch for `tabulator_load` rq timeout up.
tabulator_load()
try:
tabulator_load()
except rq_timeouts.JobTimeoutException as e:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't catching timeouts from the tabulator_load on line 266. Perhaps move this block to the outer catch, line 267?

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

Successfully merging this pull request may close these issues.

2 participants