mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:34:31 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import type { HeartbeatRunResult } from "../../infra/heartbeat-wake.js";
|
||||
import type {
|
||||
CronJob,
|
||||
CronJobCreate,
|
||||
CronJobPatch,
|
||||
CronStoreFile,
|
||||
} from "../types.js";
|
||||
import type { CronJob, CronJobCreate, CronJobPatch, CronStoreFile } from "../types.js";
|
||||
|
||||
export type CronEvent = {
|
||||
jobId: string;
|
||||
@@ -31,9 +26,7 @@ export type CronServiceDeps = {
|
||||
cronEnabled: boolean;
|
||||
enqueueSystemEvent: (text: string, opts?: { agentId?: string }) => void;
|
||||
requestHeartbeatNow: (opts?: { reason?: string }) => void;
|
||||
runHeartbeatOnce?: (opts?: {
|
||||
reason?: string;
|
||||
}) => Promise<HeartbeatRunResult>;
|
||||
runHeartbeatOnce?: (opts?: { reason?: string }) => Promise<HeartbeatRunResult>;
|
||||
runIsolatedAgentJob: (params: { job: CronJob; message: string }) => Promise<{
|
||||
status: "ok" | "error" | "skipped";
|
||||
summary?: string;
|
||||
@@ -55,9 +48,7 @@ export type CronServiceState = {
|
||||
warnedDisabled: boolean;
|
||||
};
|
||||
|
||||
export function createCronServiceState(
|
||||
deps: CronServiceDeps,
|
||||
): CronServiceState {
|
||||
export function createCronServiceState(deps: CronServiceDeps): CronServiceState {
|
||||
return {
|
||||
deps: { ...deps, nowMs: deps.nowMs ?? (() => Date.now()) },
|
||||
store: null,
|
||||
@@ -83,9 +74,7 @@ export type CronRunResult =
|
||||
| { ok: true; ran: false; reason: "not-due" }
|
||||
| { ok: false };
|
||||
|
||||
export type CronRemoveResult =
|
||||
| { ok: true; removed: boolean }
|
||||
| { ok: false; removed: false };
|
||||
export type CronRemoveResult = { ok: true; removed: boolean } | { ok: false; removed: false };
|
||||
|
||||
export type CronAddResult = CronJob;
|
||||
export type CronUpdateResult = CronJob;
|
||||
|
||||
Reference in New Issue
Block a user