-
Notifications
You must be signed in to change notification settings - Fork 5
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
make worker queue have a size of 1 #158
make worker queue have a size of 1 #158
Conversation
I would write tests for this, but we need #145 to be merged before we can do that. So I think this should be a WIP until that is done. |
Codecov Report
@@ Coverage Diff @@
## main #158 +/- ##
==========================================
+ Coverage 82.95% 83.07% +0.12%
==========================================
Files 39 40 +1
Lines 1103 1111 +8
==========================================
+ Hits 915 923 +8
Misses 188 188
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
solves #157 |
there's a lot more changes in this than there ought to be... investigating now. |
239da6d
to
e82f4d4
Compare
tests/worker/test_reworker.py
Outdated
@@ -125,3 +126,12 @@ def on_event(event: E, event_id: Optional[str]) -> None: | |||
sub = stream.subscribe(on_event) | |||
future.add_done_callback(lambda _: stream.unsubscribe(sub)) | |||
return future | |||
|
|||
|
|||
def test_worker_only_accepts_one_task_on_queue(worker: Worker, timeout: float = 5.0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeout is unused
made queue have one thing in it. Raising error if attempt to submit while worker is running