统一前后端代码格式化配置

This commit is contained in:
yml2213
2026-08-16 17:27:12 +08:00
parent 8705f6a6a1
commit 5c7c3e14e3
278 changed files with 6386 additions and 5500 deletions
@@ -1,10 +1,7 @@
import { logError, logInfo, logWarn } from '../../utils/logger.js'
import { createHttpError } from '../../utils/http.js'
import type { JsonObject } from '../../types/json.js'
import {
getScheduledJobById,
getScheduledJobsConfig,
} from './config-service.js'
import { getScheduledJobById, getScheduledJobsConfig } from './config-service.js'
import { runCloudtentaclesHealthJob } from './cloudtentacles-health-job.js'
import { runDepositUnfreezeJob } from './deposit-unfreeze-job.js'
import { runWorkOrderTimeoutJob } from './work-order-timeout-job.js'
@@ -52,7 +49,9 @@ export function getScheduledJobRuntimeStates() {
export async function runScheduledJobNow(jobId: unknown) {
const config = getScheduledJobsConfig()
const job = config.jobs.find((item) => String(item.id || '').trim() === String(jobId || '').trim())
const job = config.jobs.find(
(item) => String(item.id || '').trim() === String(jobId || '').trim(),
)
if (!job) {
throw createHttpError('定时任务不存在', {
@@ -131,8 +130,7 @@ async function runJob(job: JsonObject, { manual = false }: { manual?: boolean }
try {
const result = await dispatchJob(job)
const summary =
result && typeof result === 'object' ? (result as JsonObject) : {}
const summary = result && typeof result === 'object' ? (result as JsonObject) : {}
updateJobState(jobId, {
running: false,
lastFinishedAt: new Date().toISOString(),