fix(core): support unlimited shell timeouts
This commit is contained in:
parent
7668eb728d
commit
59790380de
11 changed files with 213 additions and 47 deletions
|
|
@ -38,6 +38,20 @@ export const ShellHandler = HttpApiBuilder.group(Api, "server.shell", (handlers)
|
|||
)
|
||||
}),
|
||||
)
|
||||
.handle(
|
||||
"shell.timeout",
|
||||
Effect.fn(function* (ctx) {
|
||||
const shell = yield* Shell.Service
|
||||
return yield* response(
|
||||
shell.timeout(ctx.params.id, ctx.payload.timeout).pipe(
|
||||
Effect.catchTag(
|
||||
"Shell.NotFoundError",
|
||||
() => new ShellNotFoundError({ id: ctx.params.id, message: `Shell command not found: ${ctx.params.id}` }),
|
||||
),
|
||||
),
|
||||
)
|
||||
}),
|
||||
)
|
||||
.handle(
|
||||
"shell.output",
|
||||
Effect.fn(function* (ctx) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue