RedisOptions.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DEFAULT_REDIS_OPTIONS = void 0;
  4. exports.DEFAULT_REDIS_OPTIONS = {
  5. // Connection
  6. port: 6379,
  7. host: "localhost",
  8. family: 4,
  9. connectTimeout: 10000,
  10. disconnectTimeout: 2000,
  11. retryStrategy: function (times) {
  12. return Math.min(times * 50, 2000);
  13. },
  14. keepAlive: 0,
  15. noDelay: true,
  16. connectionName: null,
  17. // Sentinel
  18. sentinels: null,
  19. name: null,
  20. role: "master",
  21. sentinelRetryStrategy: function (times) {
  22. return Math.min(times * 10, 1000);
  23. },
  24. sentinelReconnectStrategy: function () {
  25. // This strategy only applies when sentinels are used for detecting
  26. // a failover, not during initial master resolution.
  27. // The deployment can still function when some of the sentinels are down
  28. // for a long period of time, so we may not want to attempt reconnection
  29. // very often. Therefore the default interval is fairly long (1 minute).
  30. return 60000;
  31. },
  32. natMap: null,
  33. enableTLSForSentinelMode: false,
  34. updateSentinels: true,
  35. failoverDetector: false,
  36. // Status
  37. username: null,
  38. password: null,
  39. db: 0,
  40. // Others
  41. enableOfflineQueue: true,
  42. enableReadyCheck: true,
  43. autoResubscribe: true,
  44. autoResendUnfulfilledCommands: true,
  45. lazyConnect: false,
  46. keyPrefix: "",
  47. reconnectOnError: null,
  48. readOnly: false,
  49. stringNumbers: false,
  50. maxRetriesPerRequest: 20,
  51. maxLoadingRetryTime: 10000,
  52. enableAutoPipelining: false,
  53. autoPipeliningIgnoredCommands: [],
  54. sentinelMaxConnections: 10,
  55. };