export const getQueueRateLimitKey = ( { queue } ) => { return `${ queue }:rate-limit` ; } ; export const getQueuePausedKey = ( { queue } ) => { return `${ queue }:is-paused` ; } ; export const getWorkerKeyPrefix = ( { queue } ) => { return `${ queue }:worker:` ; } ; export const getWorkerKey = ( { workerId , queue , } ) => { return `${ getWorkerKeyPrefix ( { queue } ) }${ workerId }` ; } ; export const getTaskKeyPrefix = ( { queue } ) => { return `${ queue }:tasks:` ; } ; export const getTaskKey = ( { taskId , queue , } ) => { return `${ getTaskKeyPrefix ( { queue } ) }${ taskId }` ; } ; export const getTaskAcknowledgedKey = ( { taskId , queue , } ) => { return `${ queue }:acknowledged-tasks:${ taskId }` ; } ; export const getScheduledSetKey = ( { queue } ) => `${ queue }:sets:scheduled` ; export const getQueuedListKey = ( { queue } ) => `${ queue }:lists:queued` ; export const getPausedListKey = ( { queue } ) => `${ queue }:lists:paused` ; export const getProcessingListKey = ( { queue } ) => `${ queue }:lists:processing` ; export const getSuccessListKey = ( { queue } ) => `${ queue }:lists:success` ; export const getFailedListKey = ( { queue } ) => `${ queue }:lists:failed` ; export const getStallingHashKey = ( { queue } ) => `queue:${ queue }:stalling-tasks` ; export const getWorkerPausedChannel = ( { queue } ) => `queue:${ queue }:worker-paused` ; export const getWorkerStartedChannel = ( { queue } ) => `queue:${ queue }:worker-started` ; export const getWorkerShutdownChannel = ( { queue } ) => `queue:${ queue }:worker-shutdown` ; export const getQueueRateLimitUpdatedChannel = ( { queue } ) => `queue:${ queue }:queue-rate-limit-updated` ; export const getQueueTaskQueuedChannel = ( { queue } ) => `queue:${ queue }:task-queued` ; export const getQueueTaskScheduledChannel = ( { queue } ) => `queue:${ queue }:task-scheduled` ; export const getQueueTaskUpdatedChannel = ( { queue } ) => `queue:${ queue }:task-updated` ; export const getQueueTaskProgressUpdatedChannel = ( { queue , } ) => `queue:${ queue }:task-progress-updated` ; export const getQueueTaskProcessingChannel = ( { queue } ) => `queue:${ queue }:task-processing` ; export const getQueueTaskSuccessChannel = ( { queue } ) => `queue:${ queue }:task-success` ; export const getQueueTaskErrorChannel = ( { queue } ) => `queue:${ queue }:task-error` ; export const getQueueTaskStalledChannel = ( { queue } ) => `queue:${ queue }:task-stalled` ; export const getQueueTaskFailedChannel = ( { queue } ) => `queue:${ queue }:task-fail` ; export const getQueueTaskCompleteChannel = ( { queue } ) => `queue:${ queue }:task-complete` ;