Skip to content

Commit

Permalink
🐞 fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
DrinkLessMilkTea committed Jul 16, 2024
1 parent 656e3d1 commit 3439def
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WorkerNodePython/WorkerNode/WorkerNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def run(self):
continue
except json.JSONDecodeError as e:
if msg:
self.consumer.negative_acknowledge(msg)
self.consumer.acknowledge(msg)
except requests.exceptions.HTTPError as e:
# 倄理 HTTP ι”™θ――
if e.response.status_code == 401:
Expand Down Expand Up @@ -199,12 +199,12 @@ def run(self):
print('error status code: {}'.format(e.response.status_code))
Event.createEvent(apiInstance,AIModelName,AIModelNamespace,'GeneralError',error_detail['error']['message'])
if msg:
self.consumer.negative_acknowledge(msg)
self.consumer.acknowledge(msg)

except Exception as e:
print(e.__str__())
if msg:
self.consumer.negative_acknowledge(msg)
self.consumer.acknowledge(msg)

finally:
queue.task_done()
Expand Down

0 comments on commit 3439def

Please sign in to comment.