@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 25 lines 753 Bytes
Raw
1 import * as GCP from "@alchemy.run/gcp";
2 import * as Effect from "effect/Effect";
3
4 export const MARKER_OBJECT = "marker.txt";
5
6 /**
7 * Effect-native Cloud Run Job whose `run` entry writes a Storage object.
8 * Deployed from {@link ../Job.test.ts}.
9 */
10 export default class MarkerJob extends GCP.Run.Job<MarkerJob>()(
11 "MarkerJob",
12 {
13 main: import.meta.url,
14 location: "us-central1",
15 },
16 Effect.gen(function* () {
17 const bucket = yield* GCP.Storage.Bucket("JobRunMarker", {
18 forceDestroy: true,
19 });
20 const putObject = yield* GCP.Storage.PutObject(bucket);
21 return {
22 run: putObject({ name: MARKER_OBJECT, body: "ran" }).pipe(Effect.asVoid, Effect.orDie),
23 };
24 }).pipe(Effect.provide(GCP.Storage.PutObjectHttp)),
25 ) {}