-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Lifespan question #2
Comments
Great question, I'm curious for the reply by experts, been working on something similar. |
Can you give me an MRE? (GitHub repository with minimal setup would be great.) |
I'll reopen if you reply. |
Sorry I just saw the message, will create one tomorrow |
@Kludex hey, I have an example here: https://github.com/hummingbot/backend-api/blob/feat/add_market_data/routers/manage_market_data.py I'm thinking about creating an endpoint to start a candles and stop the candles from a collection and if you ask for the realtime candles instead of creating and initializing the object will be just using the active candles. As a reference, this is the class that we use in Hummingbot to keep the most updated length required of candles that are running: https://github.com/hummingbot/hummingbot/blob/master/hummingbot/data_feed/market_data_provider.py |
Hey, First of all thanks for this initiative, it's great!
I have a question regarding the lifespan to manage objects.
Let's say that I would like to provide realtime data, and I have an object that subscribes via ws and keeps certain data updated, so I can expose a route to provide this data aggregated. Should I create the object with the lifespan approach? Or which is your recommendation?
The text was updated successfully, but these errors were encountered: