edtech / scripts /db-ops /flush_cache.ts
CognxSafeTrack
refactor(worker): Sprint 2 β€” dead code removal and queue consolidation
37fb9ce
import { Redis } from 'ioredis';
const REDIS_URL = 'redis://default:vhc8qRKNhjcRgq53CMDHsb4o006jVaOl@redis-12765.c282.east-us-mz.azure.cloud.redislabs.com:12765';
async function flushCache() {
const redis = new Redis(REDIS_URL);
console.log('Flushing cache for default-org-id...');
await redis.del('org:full:default-org-id');
await redis.del('org:phone:969048009628694');
console.log('βœ… Cache flushed. Worker will pull fresh raw token from DB.');
redis.quit();
}
flushCache().catch(console.error);