From efaae9e58650a143b43f4e002cecf8d350c0fa00 Mon Sep 17 00:00:00 2001 From: Venkatesh S <62867645+venkatesh-sekar@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:56:54 +0530 Subject: [PATCH 1/2] fix: update on_ticks function in stream example --- stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.py b/stream.py index a7eda35..8933d99 100644 --- a/stream.py +++ b/stream.py @@ -38,7 +38,7 @@ def on_reconnect(ws, attempts_count): logging.info("Reconnecting: {}".format(attempts_count)) # Assign the callbacks. -kws.on_tick = on_tick +kws.on_ticks = on_tick kws.on_connect = on_connect kws.on_close = on_close kws.on_error = on_error From 1002c20a2f066b260ee6c8cc1b86ce411be79e1b Mon Sep 17 00:00:00 2001 From: Venkatesh S <62867645+venkatesh-sekar@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:02:01 +0530 Subject: [PATCH 2/2] refactor: update the callback function name --- stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream.py b/stream.py index 8933d99..5403912 100644 --- a/stream.py +++ b/stream.py @@ -16,7 +16,7 @@ # Callback for tick reception. -def on_tick(ws, ticks): +def on_ticks(ws, ticks): logging.info("on tick - {}".format(json.dumps(ticks))) insert_ticks.delay(ticks) @@ -38,7 +38,7 @@ def on_reconnect(ws, attempts_count): logging.info("Reconnecting: {}".format(attempts_count)) # Assign the callbacks. -kws.on_ticks = on_tick +kws.on_ticks = on_ticks kws.on_connect = on_connect kws.on_close = on_close kws.on_error = on_error