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

Fix issue #758. #832

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions flow/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2203,9 +2203,16 @@ def _expand_bundled_jobs(self, scheduler_jobs):
bundle_prefix = self._bundle_prefix
for job in scheduler_jobs:
if job.name().startswith(bundle_prefix):
with open(self._fn_bundle(job.name())) as file:
for line in file:
yield ClusterJob(line.strip(), job.status())
bundle_name = self._fn_bundle(job.name())
# Ensure that the bundle exists in this project before yielding
# jobs from it. This check is necessary because scheduler jobs
# with the same prefix could exist, submitted by other
# FlowProjects with the same name from this user or other
# users. See https://github.com/glotzerlab/signac-flow/issues/758
if os.path.exists(bundle_name):
with open(bundle_name) as file:
for line in file:
yield ClusterJob(line.strip(), job.status())
else:
yield job

Expand Down
Loading