crypto-rl
crypto-rl copied to clipboard
Define a time limit on recorder
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!
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).