bugfixing
This commit is contained in:
parent
0bb9634f13
commit
4538795383
@ -296,7 +296,10 @@ def check_contract_expiry(symbol):
|
|||||||
async def process_symbol(symbol):
|
async def process_symbol(symbol):
|
||||||
try:
|
try:
|
||||||
print(f"==========Start Process for {symbol}==========")
|
print(f"==========Start Process for {symbol}==========")
|
||||||
expiration_list = get_contracts_from_directory(symbol) #get_all_expirations(symbol)
|
expiration_list = get_all_expirations(symbol)
|
||||||
|
if len(expiration_list) < 0:
|
||||||
|
expiration_list = get_contracts_from_directory(symbol)
|
||||||
|
|
||||||
#check existing contracts and delete expired ones
|
#check existing contracts and delete expired ones
|
||||||
check_contract_expiry(symbol)
|
check_contract_expiry(symbol)
|
||||||
|
|
||||||
@ -325,9 +328,7 @@ def get_tickers_from_directory(directory: str):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
total_symbols = get_tickers_from_directory(directory_path)
|
total_symbols = get_total_symbols() #get_tickers_from_directory(directory_path)
|
||||||
if len(total_symbols) < 2000:
|
|
||||||
total_symbols = get_total_symbols()
|
|
||||||
|
|
||||||
for symbol in tqdm(total_symbols):
|
for symbol in tqdm(total_symbols):
|
||||||
await process_symbol(symbol)
|
await process_symbol(symbol)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user