Skip to content

update: fix awaiting for queued job#295

Merged
VsevolodX merged 1 commit intomainfrom
feature/SOF-7805
Apr 11, 2026
Merged

update: fix awaiting for queued job#295
VsevolodX merged 1 commit intomainfrom
feature/SOF-7805

Conversation

@VsevolodX
Copy link
Copy Markdown
Member

@VsevolodX VsevolodX commented Apr 11, 2026

Summary by CodeRabbit

Bug Fixes

  • Improved job status tracking to correctly monitor jobs in queued state alongside submitted jobs, ensuring accurate status counts.
  • Enhanced background job polling to continue monitoring queued jobs as active, preventing premature completion detection.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

Modified wait_for_jobs_to_finish_async function to count both submitted and queued statuses in the "SUBMITTED-JOBS" display, and expanded the set of active statuses to include queued in the completion predicate, ensuring the polling loop continues when jobs are queued.

Changes

Cohort / File(s) Summary
Job Status Aggregation
utils/api.py
Updated job status counting to include queued alongside submitted in the "SUBMITTED-JOBS" count, and modified the completion predicate to treat queued as an active status to maintain polling continuity.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #272: Directly modifies the same wait_for_jobs_to_finish_async function with related adjustments to job status handling and active status definitions.

Suggested reviewers

  • timurbazhirov

Poem

🐰 Queued jobs now find their proper place,
No longer lost in status space,
With submitted joined as one,
The polling dance continues on!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'update: fix awaiting for queued job' directly addresses the main change: fixing job status handling to properly await queued jobs by including 'queued' in the active statuses.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/SOF-7805

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
utils/api.py (1)

88-89: Behavior is correct; align the docstring with the new active-status set.

Since queued is now treated as active in Lines 88-89, update the function docstring (Line 69) to include queued as well.

📝 Suggested docstring update
-    A job is considered finished if it is not in "pre-submission", "submitted", or, "active" status.
+    A job is considered finished if it is not in "pre-submission", "submitted", "queued", or "active" status.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@utils/api.py` around lines 88 - 89, Update the function docstring to reflect
that "queued" is considered an active status to match the implementation that
sets active_statuses = {"pre-submission", "submitted", "queued", "active"};
locate the docstring above this logic (around the earlier docstring at line 69)
and add "queued" to the list of active statuses described so the documentation
and the function (active_statuses / any(status in active_statuses for status in
statuses)) remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@utils/api.py`:
- Around line 88-89: Update the function docstring to reflect that "queued" is
considered an active status to match the implementation that sets
active_statuses = {"pre-submission", "submitted", "queued", "active"}; locate
the docstring above this logic (around the earlier docstring at line 69) and add
"queued" to the list of active statuses described so the documentation and the
function (active_statuses / any(status in active_statuses for status in
statuses)) remain consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3593eb8-0f12-4bc1-be3a-62afcd59e2f9

📥 Commits

Reviewing files that changed from the base of the PR and between f13e84f and ff5723f.

📒 Files selected for processing (1)
  • utils/api.py

@VsevolodX VsevolodX merged commit 01af86c into main Apr 11, 2026
5 checks passed
@VsevolodX VsevolodX deleted the feature/SOF-7805 branch April 11, 2026 04:03
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