Fix draining behaviour - #1180
Conversation
🦋 Changeset detectedLatest commit: 3b1a7b8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…o lukas/fix-draining
| start(): Promise<Throws<void, Error>>; | ||
| join(): Promise<Throws<void, Error>>; | ||
| initialize(): Promise<Throws<void, Error>>; | ||
| close(): Promise<Throws<void, Error>>; | ||
| launchJob(info: RunningJobInfo): Promise<Throws<void, Error>>; |
There was a problem hiding this comment.
Maybe we can make a dedicated Error class for these operations?
There was a problem hiding this comment.
yeah, that would be nice, just didn't want to blow this PR out of scope
| return await abortFuture.await; | ||
| } | ||
|
|
||
| export async function rejectOnAbort(signal: AbortSignal): Promise<never> { |
There was a problem hiding this comment.
Can we annotate this with Throws?
There was a problem hiding this comment.
For the annotation to be accurate we'd have to ensure that controller.abort can only be called with a certain type of error, which means we'd need a more strictly typed version of AbortSignal as well
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Description
WS_FULLstatus when drainingThrowstype for job executor and handle exceptions instead of throwing unhandled exceptionsChanges Made
Pre-Review Checklist
Testing
restaurant_agent.tsandrealtime_agent.tswork properly (for major changes)Additional Notes
Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.