diff --git a/back/app.ts b/back/app.ts index daad0526..374ce7e2 100644 --- a/back/app.ts +++ b/back/app.ts @@ -17,7 +17,7 @@ async function startServer() { const server = app .listen(config.port, () => { - Logger.debug(`✌️ Back server launched on port ${config.port}`); + Logger.debug(`✌️ 后端服务启动成功!`); }) .on('error', (err) => { Logger.error(err); diff --git a/back/loaders/initTask.ts b/back/loaders/initTask.ts index 3b9c8301..9036191f 100644 --- a/back/loaders/initTask.ts +++ b/back/loaders/initTask.ts @@ -18,13 +18,12 @@ export default async () => { tokenCommand = `node ${tokenFile}`; } const cron = { - id: 'token', + id: NaN, name: '生成token', command: tokenCommand, }; - scheduleService.createIntervalTask(cron as any, { + scheduleService.createIntervalTask(cron, { days: 28, - runImmediately: true, }); // 运行删除日志任务 @@ -37,7 +36,6 @@ export default async () => { }; scheduleService.createIntervalTask(cron, { days: data.info.frequency, - runImmediately: true, }); } diff --git a/back/public.ts b/back/public.ts index d95497ae..1aec56b0 100644 --- a/back/public.ts +++ b/back/public.ts @@ -22,7 +22,7 @@ app await require('./loaders/sentry').default({ expressApp: app }); await require('./loaders/db').default(); - Logger.debug(`✌️ Back server launched on port ${config.publicPort}`); + Logger.debug(`✌️ 公共服务启动成功!`); }) .on('error', (err) => { Logger.error(err); diff --git a/back/schedule.ts b/back/schedule.ts index c7f3b69f..b8fed4c0 100644 --- a/back/schedule.ts +++ b/back/schedule.ts @@ -44,11 +44,7 @@ app await require('./loaders/db').default(); await run(); - Logger.info(` - ################################################ - 🛡️ Schedule listening on port: ${config.cronPort} 🛡️ - ################################################ - `); + Logger.debug('定时任务服务启动成功!'); }) .on('error', (err) => { Logger.error(err); diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index b931cf11..d201a6d5 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -42,13 +42,13 @@ echo -e "定时任务启动成功...\n" if [[ $AutoStartBot == true ]]; then echo -e "======================7. 启动bot========================\n" - nohup ql bot >>$dir_log/start.log 2>&1 & + nohup ql bot >>$dir_log/bot.log 2>&1 & echo -e "bot后台启动中...\n" fi if [[ $EnableExtraShell == true ]]; then echo -e "======================8. 执行自定义脚本========================\n" - nohup ql extra >>$dir_log/start.log 2>&1 & + nohup ql extra >>$dir_log/extra.log 2>&1 & echo -e "自定义脚本后台执行中...\n" fi