Skip to content

Commit

Permalink
fix: websocket callback errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloHiro committed Oct 22, 2024
1 parent 764dcbf commit 61a8f90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions awxkit/awxkit/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def unsubscribe(self, wait=True, timeout=10):
else:
self._send(json.dumps(dict(groups={}, xrftoken=self.csrftoken)))

def _on_message(self, message):
def _on_message(self, message, *args):
message = json.loads(message)
log.debug('received message: {}'.format(message))
if self._add_received_time:
Expand All @@ -230,13 +230,13 @@ def _update_subscription(self, job_id):
self.subscribe(**subscription)
self._should_subscribe_to_pending_job = False

def _on_open(self):
def _on_open(self, *args):
self._ws_connected_flag.set()

def _on_error(self, error):
log.info('Error received: {}'.format(error))
def _on_error(self, *args):
log.info('Error received: {}'.format(args))

Check warning on line 237 in awxkit/awxkit/ws.py

View check run for this annotation

Codecov / codecov/patch

awxkit/awxkit/ws.py#L237

Added line #L237 was not covered by tests

def _on_close(self):
def _on_close(self, *args):
log.info('Successfully closed ws.')
self._ws_closed = True

Expand Down

0 comments on commit 61a8f90

Please sign in to comment.