-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: worker pooling #962
base: main
Are you sure you want to change the base?
feat: worker pooling #962
Changes from 18 commits
cfa9b01
3d77943
7e4462e
9be7ee4
ad8e667
7838471
6487117
94e9926
d57b4ea
2c4e0e2
4389e57
4f120b4
b548328
ebf7188
49c5d1f
577ed2a
348c359
16a91dc
4457e63
10f46df
c9f7284
74f97b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Policy, t, typegraph } from "jsr:@typegraph/[email protected]"; | ||
import { PythonRuntime } from "jsr:@typegraph/[email protected]/runtimes/python"; | ||
import { DenoRuntime } from "jsr:@typegraph/[email protected]/runtimes/deno"; | ||
import { Policy, t, typegraph } from "jsr:@typegraph/[email protected].1-rc.0"; | ||
import { PythonRuntime } from "jsr:@typegraph/[email protected].1-rc.0/runtimes/python"; | ||
import { DenoRuntime } from "jsr:@typegraph/[email protected].1-rc.0/runtimes/deno"; | ||
|
||
await typegraph("example", (g) => { | ||
const pub = Policy.public(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,7 @@ export class DenoRuntime extends Runtime { | |
} | ||
|
||
async deinit(): Promise<void> { | ||
// await this.workerManager.deinit(); | ||
this.workerManager.deinit(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider awaiting worker manager deinitialization. Not awaiting Apply this diff to ensure proper resource cleanup: - this.workerManager.deinit();
+ await this.workerManager.deinit();
|
||
} | ||
|
||
materialize( | ||
|
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.
Allow zero values for worker configuration parameters
The use of
.positive()
inz.coerce.number().positive()
disallows zero values. However, in the worker pool configuration, a value of zero formaxWorkers
orwaitTimeoutMs
may be used to indicate "no limit" or "no timeout". Consider using.nonnegative()
instead to allow zero values where appropriate.Apply this diff to allow zero values:
📝 Committable suggestion