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

Define a time limit on recorder #27

Open
pierremotard opened this issue Oct 19, 2021 · 1 comment
Open

Define a time limit on recorder #27

pierremotard opened this issue Oct 19, 2021 · 1 comment

Comments

@pierremotard
Copy link

I want to record the LOB using recorder.py but when I run for 24 hours, some connection error happens at some time. I would like to record just a short period to try on some data, see if mongo works with me etc. I don't understand how the run_until_complete function works and how we can define to record for a specific (shorter) period.
Thanks in advance!

@sadighian
Copy link
Owner

Hi Pierre,

[1] If you executed recorder.py with RECORD_DATA = True, then you should already have data in your MongoDB (assuming the recorder ran long enough to collect BATCH_SIZE number of records).

[2] If you want to run record data for a short period of time, then reduce the BATCH_SIZE to your desired interval and kill the program when you're done recording.

[3] The run_until_complete() function executes the asyncio application (i.e., LOB websocket feed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants