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

pool: load missing prerequisite status from database #31

Merged
merged 2 commits into from
Mar 10, 2023

Conversation

oliver-sanders
Copy link

@oliver-sanders oliver-sanders commented Mar 1, 2023

Built On: cylc#5328

If a prerequisite is missing from the database on reload/restart, then look through the task outputs table to see whether it is satisfied.

Two issues/questions:

  1. I'm not sure how to square this with the data store without duplicating the database calls.
  2. This PR marks all satisfied prerequisites as satisfied naturally. I think the information is lost by this point, is there a more suitable value e.g satisfied from DB?

* Accompanies cylc#5334
  which fixes traceback for missing prereqs on reload/restart
  by marking them as unsatisfied.
if do_restart:
async with start(schd):
# start the workflow and run part 1 of the tests
test.asend(schd)
Copy link
Author

Choose a reason for hiding this comment

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

Generators can yield data, but you can also send data into them with generator.send.

asend is the async version of send for async generators.

This is a sneaky trick to avoid having to write the same test twice once for reload and once for restart.

Copy link
Owner

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Looks good, thanks

@hjoliver hjoliver merged commit d3c47b8 into hjoliver:fix-prereq-bug Mar 10, 2023
@hjoliver
Copy link
Owner

(Questions addressed on main PR page)

@oliver-sanders oliver-sanders deleted the fix-prereq-bug branch March 10, 2023 10:16
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