fix: add gateway stop/restart commands

This commit is contained in:
Peter Steinberger
2026-01-06 03:25:21 +01:00
parent cc0ef4d012
commit 0398f684e7
18 changed files with 339 additions and 28 deletions

View File

@@ -1,3 +1,7 @@
import {
normalizeCronJobCreate,
normalizeCronJobPatch,
} from "../../cron/normalize.js";
import {
readCronRunLogEntries,
resolveCronRunLogPath,
@@ -17,10 +21,6 @@ import {
validateWakeParams,
} from "../protocol/index.js";
import type { GatewayRequestHandlers } from "./types.js";
import {
normalizeCronJobCreate,
normalizeCronJobPatch,
} from "../../cron/normalize.js";
export const cronHandlers: GatewayRequestHandlers = {
wake: ({ params, respond, context }) => {
@@ -88,9 +88,7 @@ export const cronHandlers: GatewayRequestHandlers = {
);
return;
}
const job = await context.cron.add(
normalized as unknown as CronJobCreate,
);
const job = await context.cron.add(normalized as unknown as CronJobCreate);
respond(true, job, undefined);
},
"cron.update": async ({ params, respond, context }) => {