'go machinery worker - not picking up registered tasks when IgnoreWhenTaskNotRegistered = true

I'm using machinery/V1 and broker and result_backend -> redis This is my architecture :

2 ECS services:

-> has a machinery server instance and adds the tasks (IgnoreWhenTaskNotRegistered = true) -> service to process the tasks , has a worker instance with this config (concurrency:1 ) and all the tasks are registered here. Note : In 1st ECS I'm not registering any tasks when i'm sending the tasks to machinery server.

2 services use same redis instance for broker and result_backend

When IgnoreWhenTaskNotRegistered = false, everything works fine and tasks are picked by worker (if an unregistered task is sent, it is infinitely retried as expected).

Issue : 1. When IgnoreWhenTaskNotRegistered = true, Worker (2nd ECS) is not picking every task that is sent by 1st ECS. Strange thing is that it is picking some tasks (randomly)

My concern is that even when tasks are registered by worker, they are being ignored (with this variable , IgnoreWhenTaskNotRegistered = true)

why can't I use IgnoreWhenTaskNotRegistered = false and be happy about it ?

There are other devs who are not aware of this and may try to add a task unregistered and there will be like 15 GB of logs in 6 hrs(task not registered , retrying again)

go


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source