-
Notifications
You must be signed in to change notification settings - Fork 2
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
Task: Implement the resume event for tasks. #140
base: main
Are you sure you want to change the base?
Conversation
Creating a Draft PR for now, the biggest outstanding work is to listen at the right recv() endpoint. Currently the task source server is listening in all interfaces but the recv sent to the server when creating a callback is always a localhost |
lib/core/tasks.ts
Outdated
} | ||
|
||
private async handleTask(task: TaskMessage): Promise<void> { | ||
const resumeBody = await this.#resonate.store.tasks.claim(task.id, task.counter); |
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.
I think we need a fast exit here in the case where we fail to claim the task. Does the store throw in that case?
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.
Yes the store throws in this case, I will hande this case.
8a97b4d
to
313eca5
Compare
This commits include most of the initial implementation for the task framework. At the time of this commit, only the Resume event is being handled.
b2b6c3e
to
318d600
Compare
The current sleep tests had timeouts set too short, given the server <-> client latencies and the different processing times both at the server and client it was needed to increase the timeouts and sleep times. This caused the tests to take way too long, by merging all the test calls in a single one and awaiting only a "promise.all" it was possible to speed it up.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
+ Coverage 81.09% 82.99% +1.89%
==========================================
Files 17 21 +4
Lines 1095 1382 +287
Branches 290 364 +74
==========================================
+ Hits 888 1147 +259
- Misses 207 235 +28 ☔ View full report in Codecov by Sentry. |
No description provided.