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: Force sacct to look at the last 2 days #9

Merged
merged 5 commits into from
Jan 5, 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
7 changes: 6 additions & 1 deletion snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def check_active_jobs(
(status_of_jobs, sacct_query_duration) = await self.job_stati(
# -X: only show main job, no substeps
f"sacct -X --parsable2 --noheader --format=JobIdRaw,State "
f"--name {self.run_uuid}"
f"--starttime now-2days --endtime now --name {self.run_uuid}"
)
if status_of_jobs is None and sacct_query_duration is None:
self.logger.debug(f"could not check status of job {self.run_uuid}")
Expand All @@ -220,6 +220,10 @@ async def check_active_jobs(
active_jobs_ids_with_current_sacct_status = (
set(status_of_jobs.keys()) & active_jobs_ids
)
self.logger.debug(
f"active_jobs_ids_with_current_sacct_status are: "
f"{active_jobs_ids_with_current_sacct_status}"
)
active_jobs_seen_by_sacct = (
active_jobs_seen_by_sacct
| active_jobs_ids_with_current_sacct_status
Expand All @@ -231,6 +235,7 @@ async def check_active_jobs(
active_jobs_seen_by_sacct
- active_jobs_ids_with_current_sacct_status
)
self.logger.debug(f"missing_sacct_status are: {missing_sacct_status}")
if not missing_sacct_status:
break
if i >= status_attempts - 1:
Expand Down
Loading