celery.node icon indicating copy to clipboard operation
celery.node copied to clipboard

Feature: support redis result queue expiration time to be configurable.

Open guojiongwei opened this issue 2 years ago • 0 comments

Description

  • I want to support redis result queue expiration time to be configurable.
  • Proposed Behavior
// src/backends/redis.ts
  /**
   * @method RedisBackend#set
   * @private
   * @param {String} key
   * @param {String} value
   * @returns {Promise}
   */
  private set(key: string, value: string): Promise<["OK", number]> {
    return Promise.all([
      // this.redis.setex(key, 86400, value),
      this.redis.setex(key, (this.config?.CELERY_RESULT_EXPIRES/1000) || 86400, value),
      this.redis.publish(key, value) // publish command for subscribe
    ]);
  }

I want to change the fixed 86400 expiration time to be configurable through CELERY_RESULT_EXPIRES.

guojiongwei avatar Feb 14 '23 15:02 guojiongwei