13 lines
533 B
TypeScript
13 lines
533 B
TypeScript
import { ensureSchedulingTables } from './routes/scheduling/db-schema.js';
|
|
import { startMileageBackgroundJobs } from './routes/mileage/index.js';
|
|
import { startAssetHistoryScheduler } from './routes/asset-history/runtime.js';
|
|
|
|
/** 启动只应在服务进程中运行的数据库准备和定时任务。 */
|
|
export function startBackgroundServices(): void {
|
|
ensureSchedulingTables().catch((error) => {
|
|
console.error('scheduling bootstrap error:', error);
|
|
});
|
|
startMileageBackgroundJobs();
|
|
startAssetHistoryScheduler();
|
|
}
|