update cron job
This commit is contained in:
parent
937086c420
commit
1621339ac2
@ -111,8 +111,8 @@ async def run():
|
|||||||
for i in range(0, len(total_symbols), chunk_size):
|
for i in range(0, len(total_symbols), chunk_size):
|
||||||
symbols_chunk = total_symbols[i:i + chunk_size]
|
symbols_chunk = total_symbols[i:i + chunk_size]
|
||||||
await fetch_and_save_symbols_data(symbols_chunk, etf_symbols, crypto_symbols, session)
|
await fetch_and_save_symbols_data(symbols_chunk, etf_symbols, crypto_symbols, session)
|
||||||
print('sleeping for 60 sec')
|
print('sleeping for 30 sec')
|
||||||
await asyncio.sleep(60) # Wait for 60 seconds between chunks
|
await asyncio.sleep(30) # Wait for 60 seconds between chunks
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Failed to run fetch and save data: {e}")
|
print(f"Failed to run fetch and save data: {e}")
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ try:
|
|||||||
end_date = end_date.strftime("%Y-%m-%d")
|
end_date = end_date.strftime("%Y-%m-%d")
|
||||||
|
|
||||||
|
|
||||||
chunk_size = 250
|
chunk_size = 400
|
||||||
asyncio.run(run())
|
asyncio.run(run())
|
||||||
con.close()
|
con.close()
|
||||||
etf_con.close()
|
etf_con.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user