Files
smart_grid_iot/server/src/task/icc_gateway_sync.task.ts
T

18 lines
608 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { BuiltinJob } from "./job_registry";
/**
* 智电网关同步任务:从 ICC 平台拉取智电改造网关设备并按 imei/deviceCode 幂等 upsert,
* 写 icc_sync_log。默认每 10 分钟执行一次。
*/
export const iccGatewaySyncJob: BuiltinJob = {
jobKey: "icc_gateway_sync",
jobName: "智电网关同步",
description: "从 ICC 平台拉取智电改造网关设备并按 imei/deviceCode 幂等 upsert(写 icc_sync_log)",
defaultCron: "*/10 * * * *",
defaultParams: {},
paramFields: [],
handler: async (_params, ctx) => {
return ctx.runtime.syncIccGateways();
}
};