Hii, i am trying using nameko retry backoff, but i got error this:
(expected) error handling worker <WorkerContext [worker_consumer.consume] at 0x7faeaf1119e8>: Backoff(uninitialised)
Traceback (most recent call last):
File "/home/ubuntu/.virtualenvs/chat-services/lib/python3.6/site-packages/nameko/containers.py", line 392, in _run_worker
result = method(*worker_ctx.args, **worker_ctx.kwargs)
File "serviceschat.py", line 74, in consume
raise CustomBackOff()
services.premiumchat.CustomBackOff: Backoff(uninitialised)
[worker_consumer.consume.a1647889-a34d-49a5-a163-e67e2be7433c] entrypoint result trace
there is my code:
class CustomBackOff(Backoff):
limit = 2
schedule = [1000]
name = 'worker_consumer'
tq = Queue('DOCTORPREMIUM')
class Chats:
@consume(tq)
def consume(self, body):
if body is problem:
raise CustomBackOff()