@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 39 lines 1.23 KB
Raw
1 import type * as deadline from "@distilled.cloud/aws/deadline";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Queue } from "./Queue.ts";
5
6 /**
7 * Runtime binding for `deadline:SearchTasks`.
8 *
9 * Searches the tasks of the bound {@link Queue} (optionally narrowed to one
10 * `jobId`) with filter and sort expressions. The queue's
11 * `farmId`/`queueIds: [queueId]` are injected from the binding. Provide the
12 * implementation with `Effect.provide(AWS.Deadline.SearchTasksHttp)`.
13 * ### Monitoring Tasks
14 * **Example:** Page Through A Job's Tasks
15 * ```typescript
16 * // init — bind the operation to the queue
17 * const searchTasks = yield* AWS.Deadline.SearchTasks(queue);
18 *
19 * // runtime
20 * const { tasks, totalResults } = yield* searchTasks({
21 * itemOffset: 0,
22 * jobId,
23 * });
24 * ```
25 *
26 * @binding
27 */
28 export interface SearchTasks extends Binding.Service<
29 SearchTasks,
30 "AWS.Deadline.SearchTasks",
31 (
32 queue: Queue,
33 ) => Effect.Effect<
34 (
35 request: Omit<deadline.SearchTasksRequest, "farmId" | "queueIds">,
36 ) => Effect.Effect<deadline.SearchTasksResponse, deadline.SearchTasksError>
37 >
38 > {}
39 export const SearchTasks = Binding.Service<SearchTasks>("AWS.Deadline.SearchTasks");