Skip to content

Commit

Permalink
fix: more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
leoguillaume committed Oct 15, 2024
1 parent 9412f53 commit a090e74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, r: Redis, channels):
def run(self):
logging.info("listener run")
for item in self.pubsub.listen():
logging.info(f"listener item: {item}")
if item["type"] == "message" and item["channel"] == self.KILL_PILL.encode():
break

Expand All @@ -41,6 +42,7 @@ def run(self):
logging.error(f"\nRequest prompt:\n{data["text"]}\n\nError:\n{error_traceback}")
answer = f"error on {data["id"]} request, please resend prompt later."

logging.info(f"send answer to {data['id']}")
self.redis.set(
name=data["id"], # key
value=answer, # model output
Expand Down

0 comments on commit a090e74

Please sign in to comment.