12 lines
501 B
TypeScript
12 lines
501 B
TypeScript
import { createCoordinator } from "../src/infra/redis";
|
|
import { createStorage } from "../src/infra/storage";
|
|
import { cleanupExpired } from "../src/server/spreadsheet-adapter/process-job";
|
|
import { bootstrapScript, runWithDb } from "./_bootstrap";
|
|
|
|
bootstrapScript("cleanup-temp");
|
|
|
|
runWithDb("cleanup-temp", "worker", async (db) => {
|
|
const removed = await cleanupExpired({ db, storage: createStorage(), coordinator: createCoordinator() });
|
|
console.log(`temporários expirados: ${removed}`);
|
|
});
|