数据5分钟同步一次修改

This commit is contained in:
ray
2026-05-25 18:10:46 +08:00
parent 87f629ac29
commit e5d4b027b2
11 changed files with 632 additions and 36 deletions

View File

@@ -6,6 +6,7 @@ const extraArgs = args.slice(1);
const billsResume = extraArgs.includes('--resume');
const ordersIncremental = extraArgs.includes('--incremental');
const messagesResume = extraArgs.includes('--resume');
const hotResume = extraArgs.includes('--resume');
for (const arg of extraArgs) {
if (arg.startsWith('--incremental-order-start-date=')) {
@@ -13,7 +14,7 @@ for (const arg of extraArgs) {
}
}
const { login, scheduleSync, syncAll, syncAllIncremental, syncBillsOnly, syncMessagesOnly, syncOrdersOnly } = await import('./sync.js');
const { login, scheduleSync, syncAll, syncAllIncremental, syncBillsOnly, syncMessagesOnly, syncOrdersOnly, syncHot } = await import('./sync.js');
if (command === 'login') {
await login();
@@ -50,6 +51,12 @@ if (command === 'messages') {
process.exit(0);
}
if (command === 'hot') {
const summary = await syncHot({ resume: hotResume });
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'schedule') {
await scheduleSync();
} else {