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
| 1 | import type * as scheduler from "@distilled.cloud/gcp/cloudscheduler_v1"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type { RuntimeContext } from "alchemy/RuntimeContext"; |
| 4 | import type * as Effect from "effect/Effect"; |
| 5 | import type { Job } from "./Job.ts"; |
| 6 | |
| 7 | export interface RunJobRequest extends Omit<scheduler.RunProjectsLocationsJobsRequest, "name"> {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for Cloud Scheduler `jobs.run`. |
| 11 | * |
| 12 | * Forces an immediate dispatch even if the job is already running. Bind this |
| 13 | * operation to a {@link Job} in a Function/Action init phase. Provide |
| 14 | * {@link RunJobHttp}. |
| 15 | * |
| 16 | * ### Running Jobs |
| 17 | * **Example:** Run the bound job now |
| 18 | * ```typescript |
| 19 | * const runJob = yield* GCP.CloudScheduler.RunJob(ping); |
| 20 | * yield* runJob(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | * @category CloudScheduler |
| 25 | */ |
| 26 | export interface RunJob extends Binding.Service< |
| 27 | RunJob, |
| 28 | "GCP.CloudScheduler.RunJob", |
| 29 | ( |
| 30 | job: Job, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: RunJobRequest, |
| 34 | ) => Effect.Effect<scheduler.Job, scheduler.RunProjectsLocationsJobsError, RuntimeContext> |
| 35 | > |
| 36 | > {} |
| 37 | |
| 38 | export const RunJob = Binding.Service<RunJob>("GCP.CloudScheduler.RunJob"); |