import { initDatabase } from '../models/index.js';
import { logger } from '../utils/logger.js';
import { WeixinVideoDataCenterImportService } from '../services/WeixinVideoDataCenterImportService.js';

async function main() {
  try {
    await initDatabase();
    logger.info('[WX Import] Manual run start...');
    await WeixinVideoDataCenterImportService.runDailyImport();
    logger.info('[WX Import] Manual run done.');
    process.exit(0);
  } catch (e) {
    logger.error('[WX Import] Manual run failed:', e);
    process.exit(1);
  }
}

void main();

