Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update on_ticks function in stream example #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: update the callback function name
venkatesh-sekar authored Jan 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 1002c20a2f066b260ee6c8cc1b86ce411be79e1b
4 changes: 2 additions & 2 deletions stream.py
Original file line number Diff line number Diff line change
@@ -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