feat: zvýraznění dnů v historii obsahujících objednávky
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 20s
CI / Build server (push) Successful in 24s
CI / Build client (push) Successful in 36s
CI / Playwright E2E tests (push) Successful in 1m17s
CI / Build and push Docker image (push) Successful in 40s
CI / Notify (push) Successful in 2s
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 20s
CI / Build server (push) Successful in 24s
CI / Build client (push) Successful in 36s
CI / Playwright E2E tests (push) Successful in 1m17s
CI / Build and push Docker image (push) Successful in 40s
CI / Notify (push) Successful in 2s
This commit is contained in:
@@ -31,4 +31,16 @@ export default class RedisStorage implements StorageInterface {
|
||||
await client.json.set(key, '.', data as any);
|
||||
await client.json.get(key);
|
||||
}
|
||||
|
||||
async listKeys(contains?: string): Promise<string[]> {
|
||||
// SCAN je bezpečnější než KEYS na produkci (neblokuje server)
|
||||
const match = contains ? `*${contains}*` : '*';
|
||||
const keys: string[] = [];
|
||||
for await (const key of client.scanIterator({ MATCH: match, COUNT: 100 })) {
|
||||
// node-redis v4 vrací buď string, nebo (novější verze) pole stringů
|
||||
if (Array.isArray(key)) keys.push(...key);
|
||||
else keys.push(key);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user