Fix a few async-related bugs with archive jobs #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ensure_connected
decorator to_update_status()
which avoids connecting to HPCs for every update, even the ones that didn't need it like Completed status.archive_dir
from property to an async function.jobs_table:287 update_row(): You cannot call this from an async context
.jobs_table:108 perform_action(): You cannot call this from an async context
. It also failed to add the restored job back to the main jobs table.database_sync_to_async
from a decorator oninstance_from_pbs_job()
over to a function inside async areas. This change allows for calls toinstance_from_pbs_job()
from sync functions.commands
variable, but it is fixed here as well.I'm not sure if these fixes are the best approach with async code. If the change to the decorator on
instance_from_pbs_job()
goes through, I also have to change one reference to it in another repo (load_previous_jobs).CHW-673