File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def main():
4444
4545 for exchange in market_data :
4646 num = 1
47- for chunk in split_market_data (market_data [exchange ]):
47+ for chunk in split_market_data (market_data [exchange ], settings [ 'market_data_chunk_size' ] ):
4848 market_data_chunk = dict ()
4949 market_data_chunk [exchange ] = {
5050 key : market_data [exchange ][key ] for key in chunk }
@@ -69,9 +69,9 @@ def main():
6969 worker .join ()
7070
7171
72- def split_market_data (market_data ):
73- if len (market_data .keys ()) > 20 :
74- return list (chunks (list (market_data .keys ()), 20 ))
72+ def split_market_data (market_data , chunk_size ):
73+ if len (market_data .keys ()) > chunk_size :
74+ return list (chunks (list (market_data .keys ()), chunk_size ))
7575 else :
7676 return [list (market_data .keys ())]
7777
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ settings:
88 enable_charts : false
99 output_mode : cli
1010 update_interval : 300
11+ market_data_chunk_size : 20
1112 market_pairs : null
1213 timezone : UTC
1314
You can’t perform that action at this time.
0 commit comments