crypto-rl icon indicating copy to clipboard operation
crypto-rl copied to clipboard

Define a time limit on recorder

Open pierremotard opened this issue 3 years ago • 1 comments

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!

pierremotard avatar Oct 19 '21 07:10 pierremotard

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).

sadighian avatar Oct 22 '21 23:10 sadighian