Skip to content

Commit

Permalink
Add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulincsys committed Feb 12, 2025
1 parent 8748fb0 commit e13f66c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keyman/Orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def run(self):
self.unpublish_key(request["key_str"], request["key_platform"])
elif request["type"] == "ACK":
conn.publish(stdout, "")
self.logger.info(f"ACK; for: {request['requester_id']}")
elif request["type"] == "LIST_PLATFORMS":
platforms = [ p for p in self.fresh_keys.keys() ]
conn.publish(stdout, json.dumps(platforms))
Expand All @@ -135,6 +136,7 @@ def run(self):
new_key = self.new_key(request["key_platform"])
elif request["type"] == "EXPIRE":
self.expire_key(request["key_str"], request["key_platform"], request["refresh_time"])
self.logger.debug(f"EXPIRE; from: {request['requester_id']}, platform: {request['key_platform']}")
continue
except WaitKeyTimeout as w:
timeout = w.tiemout_seconds
Expand All @@ -147,6 +149,7 @@ def run(self):
self.logger.exception("Error during REQUEST")
continue

self.logger.debug(f"REPLY; for: {request['requester_id']}, platform: {request['key_platform']}")
conn.publish(stdout, json.dumps({
"key": new_key
}))
Expand Down

0 comments on commit e13f66c

Please sign in to comment.