Skip to content

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

@guojiongwei

Description

@guojiongwei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions