require('dotenv').config({ path: 'c:/VietProDev/sso/sso-vietprodev-backend/.env' });
const redis = require('redis');
const client = redis.createClient({
  url: `redis://${process.env.REDIS_HOST || 'localhost'}:${process.env.REDIS_PORT || 6379}`,
});
client.connect().then(async () => {
  const keys = await client.keys('*');
  console.log('Total keys:', keys.length);
  // Print all keys to see patterns
  const sample = keys.slice(0, 30);
  console.log('Sample keys:');
  for (const k of sample) console.log(' ', k);
  await client.quit();
}).catch(err => {
  console.log('err:', err.message);
  process.exit(1);
});