celery.node
celery.node copied to clipboard
Feature: support redis result queue expiration time to be configurable.
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.