-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add transaction mode to worker #202
Conversation
Codecov Report
@@ Coverage Diff @@
## main #202 +/- ##
==========================================
+ Coverage 89.58% 89.83% +0.24%
==========================================
Files 40 40
Lines 1143 1151 +8
==========================================
+ Hits 1024 1034 +10
+ Misses 119 117 -2
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@tpoliaw API design makes sense, have implemented. The validation on submission sounds very sensible and has also been identified as a requirement for Artemis. I think that should go in a separate PR to avoid bloating this one. More stream-of-conciousness stuff: Generally agree with everything else although I'm a bit concerned about the expiry time solution, since it may be indeterministic and hard to test. Also, is it even blueapi's job to manage the state of everyone's potential tasks? One thought that did occur to me would be to have a stack of tasks, which would be useful for things like pausing/resuming but I haven't thought it out properly yet. Any thoughts welcome. |
For the expiration side, would an If only one task is running at once, a stack probably isn't needed although the current task would need to be available somewhere. |
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.
Cheers, all good spots. I'm a bit more convinced by the expiry time argument now, but want to do it as a separate PR, possibly along with the REST stuff, to avoid bloating this one any further.
I'm also considering deferring it since we can reasonably expect our own client implementation in GDA to do its own bookkeeping. Maybe we should wait until we have other clients that don't?
3612863
to
f34eaa4
Compare
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.
Looks clean to me
1e15de0
to
e62ee5b
Compare
f8b9342
to
57603cb
Compare
Draft PR with a suggested transaction mode for the worker, transaction mode enables creating of new tasks before they are submitted.
To consider: