script-queue-context.d.ts 774 B

12345678910111213141516171819202122
  1. import { RedisClient } from './connection';
  2. import { QueueBaseOptions } from './queue-options';
  3. import { KeysMap } from '../classes/queue-keys';
  4. import { DatabaseType } from '../types/database-type';
  5. export interface ScriptQueueContext {
  6. opts: QueueBaseOptions;
  7. toKey: (type: string) => string;
  8. keys: KeysMap;
  9. closing: Promise<void> | undefined;
  10. /**
  11. * Returns a promise that resolves to a redis client. Normally used only by subclasses.
  12. */
  13. get client(): Promise<RedisClient>;
  14. /**
  15. * Returns the database type of the Redis instance the client is connected to,
  16. */
  17. get databaseType(): DatabaseType;
  18. /**
  19. * Returns the version of the Redis instance the client is connected to,
  20. */
  21. get redisVersion(): string;
  22. }