Compare commits
No commits in common. "0e836b1d92d7720b19bc3a27c34ddc103f7bec58" and "ff9fe98a3e6f610e0584095b3691c331f3b6084e" have entirely different histories.
0e836b1d92
...
ff9fe98a3e
@ -19,11 +19,10 @@ class TasksHandlerMixin:
|
||||
def poll(self):
|
||||
while True:
|
||||
response = requests.get(f'{QUEUES_URL}/api/v1/take', headers={'queue': self.queue_name})
|
||||
task = response.get('task')
|
||||
if not task:
|
||||
if response.status_code == 404:
|
||||
time.sleep(0.2)
|
||||
continue
|
||||
data = task.json()
|
||||
data = response.json()
|
||||
try:
|
||||
self.process(data['payload'])
|
||||
except Exception as exc:
|
||||
|
Loading…
Reference in New Issue
Block a user