Skip to content

[WIP] Enhance session manager for round-robin job scheduling#126

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/enhancement-round-robin-job-dequeue
Closed

[WIP] Enhance session manager for round-robin job scheduling#126
Copilot wants to merge 2 commits intomainfrom
copilot/enhancement-round-robin-job-dequeue

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 10, 2026

  • Explore codebase and understand queue implementation
  • Add session_queueing config option (FIFO / round_robin) to config_default.py
  • Modify dequeue() in session_queue_sqlite.py to use round-robin when multiuser=True and session_queueing="round_robin"
  • Add tests for the round-robin dequeue behavior
  • Run existing tests to verify no regressions
  • Code review and security scan
Original prompt

This section details on the original issue you should resolve

<issue_title>[enhancement]: Round-robin generation sessions across users</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

No response

What should this feature add?

Right now, when running in multiuser mode, the session manager takes jobs off the queue in a FIFO manner. However, when multiple users are working with the same backend, a greedy user can enqueue 100 rendering jobs, forcing all other users to wait their turn.

This feature would change the queue logic such that the jobs for each active user are dequeued in such a way that each user is served in turn. That is, if there are users A, B and C, and their jobs are queued like this:

A job 1
A job 2
B job 1
C job 1
C job 2
A job 3

They will be processed in this order:

A job 1
B job 1
C job 1
A job 2
C job 2
A job 3

The dequeueing behavior should be controlled by a configuration variable session_queueing with one of the values 'FIFO' (traditional behavior) or round_robin (new behavior).

If multiuser mode is active, then round_robin is the default. If in single user mode, use FIFO and ignore the round_robin option.

Alternatives

No response

Additional Content

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
@lstein
Copy link
Copy Markdown
Owner

lstein commented Mar 10, 2026

@copilot You stopped work because of an internal error. Please resume work on this feature request from where you left off.

@lstein
Copy link
Copy Markdown
Owner

lstein commented Mar 10, 2026

@copilot Please try again.

Copy link
Copy Markdown
Author

Copilot AI commented Mar 10, 2026

@lstein The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 476bb1a3-6560-41f2-98ce-e95035536fa4

@lstein
Copy link
Copy Markdown
Owner

lstein commented Mar 10, 2026

@copilot please try again.

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.

[enhancement]: Round-robin generation sessions across users

2 participants