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

exclude "reserved" jobs in Autopopulate.populate #1107

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

ttngu207
Copy link
Contributor

@ttngu207 ttngu207 commented Sep 6, 2023

This PR is somewhat related to #1062

Currently, the max_calls still does not achieve the expected behavior in cases of existing reserved jobs.

Consider the case where there already are 2 reserved jobs (two other processes working on one table with reserve_jobs=True). Another call of Table.populate(max_calls=1, reserve_jobs=True) will exit right away, instead of working the next one job (the expected behavior).

This is because the list of jobs to be worked on next also include the "reserved" ones, then max_calls=1 leads to selecting the one that is already "reserved".

This PR fixes the described problem.

However, there is a bit of a redundancy here, the logic to exclude "reserved" jobs already exists in .populate1(), just not early enough.

tests_old/test_autopopulate.py Outdated Show resolved Hide resolved
@ethho ethho merged commit 214891c into datajoint:master Jan 29, 2024
9 checks passed
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.

3 participants