Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds an optional timeout parameter to the worker_request function, allowing outbound requests to specify a duration. Key changes include updating the data structures and function signatures across the RPC, kernel, and workers modules, and modifying the HTTP client configuration in the curl-worker.
- Added an optional timeout field in worker_request message types and task suspensions.
- Updated function signatures and pattern matching in both synchronous and asynchronous worker loops.
- Modified the HTTP client initialization in the curl-worker to honor the timeout parameter.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removed file; verify if its removal is intentional. |
| crates/rpc/rpc-common/src/worker.rs | Added timeout parameter to the worker message enum. |
| crates/rpc/rpc-async-client/src/worker_loop.rs | Updated worker loop functions to pass along the timeout parameter. |
| crates/kernel/src/vm/mod.rs | Updated TaskSuspend::WorkerRequest variant to include timeout. |
| crates/kernel/src/vm/builtins/bf_server.rs | Modified bf_worker_request to support an optional timeout argument. |
| crates/kernel/src/tasks/workers.rs | Added timeout field to the WorkerRequest struct. |
| crates/kernel/src/tasks/scheduler.rs | Updated scheduler pattern matching to pass along timeout values. |
| crates/daemon/src/workers_server.rs | Adjusted request processing to extract the timeout parameter. |
| crates/curl-worker/src/main.rs | Configured HTTP client to use the timeout if provided. |
Comments suppressed due to low confidence (1)
package.json:1
- The removal of package.json appears unrelated to the addition of the timeout parameter and may affect project configuration; please confirm if the removal is intentional.
Entire file removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
worker_requestso that the second argument is a list of payload-specific arguments, and the third is for extra (universalish) parameters like timeout.https://github.com/rdaum/moor/issues