mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-06 05:07:36 -05:00
16 lines
530 B
TypeScript
16 lines
530 B
TypeScript
// usage: npx tsx ./scripts/sync-tournament-vods.ts <tournamentId>
|
|
import "dotenv/config";
|
|
import { processOneTournament } from "~/routines/syncTournamentVods";
|
|
import invariant from "~/utils/invariant";
|
|
import { logger } from "~/utils/logger";
|
|
|
|
const tournamentId = Number(process.argv[2]?.trim());
|
|
invariant(
|
|
tournamentId && !Number.isNaN(tournamentId),
|
|
"tournament id is required (argument 1)",
|
|
);
|
|
|
|
logger.info(`Syncing VODs for tournament ${tournamentId}...`);
|
|
await processOneTournament(tournamentId);
|
|
logger.info("Done");
|