Skip to content

Remove time.sleep() from the submission websocket consumer - #2721

Merged
Didayolo merged 1 commit into
developfrom
remove-delay
Nov 17, 2026
Merged

Didayolo merged 1 commit into
developfrom
remove-delay

Conversation

@Didayolo

@Didayolo Didayolo commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Description

SubmissionOutputConsumer.submission_message called time.sleep(0.3) for every live log line sent to the browser. The handler is async, so this sleep froze the whole Django worker for 0.3 s each time, not just that websocket. While submissions were streaming logs, every other request handled by that worker (pages, API calls) had to wait.

The sleep was a leftover ("Simulate some processing delay") and served no purpose, so it is removed. Log lines now reach the browser as soon as they arrive.

A checklist for hand testing

  • Make a submission and look at live logs

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo
Didayolo merged commit c3023da into develop Nov 17, 2026
3 checks passed
@Didayolo
Didayolo deleted the remove-delay branch November 17, 2026 14:05
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.

1 participant