CognxSafeTrack
Claude Sonnet 4.6
refactor(worker): Sprint 2 — dead code removal and queue consolidation
37fb9ce Download scripts/db-ops/flush_cache.ts from safetrack/edtech: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/spaces/safetrack/edtech/resolve/main/scripts/db-ops/flush_cache.ts
- Command line
-
hf download hf://spaces/safetrack/edtech/scripts/db-ops/flush_cache.ts
-
curl -L -o flush_cache.ts https://huggingface.co/spaces/safetrack/edtech/resolve/main/scripts/db-ops/flush_cache.ts
542 Bytes
| 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); | |