update cron job
This commit is contained in:
parent
2e5c388783
commit
66ac3567b7
@ -65,7 +65,7 @@ async def run():
|
|||||||
for i in tqdm(range(0, len(tasks), batch_size)):
|
for i in tqdm(range(0, len(tasks), batch_size)):
|
||||||
batch = tasks[i:i + batch_size]
|
batch = tasks[i:i + batch_size]
|
||||||
await asyncio.gather(*batch)
|
await asyncio.gather(*batch)
|
||||||
await asyncio.sleep(300)
|
await asyncio.sleep(10)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -42,8 +42,8 @@ def get_data():
|
|||||||
if count == 0:
|
if count == 0:
|
||||||
next_page = ''
|
next_page = ''
|
||||||
try:
|
try:
|
||||||
response = intrinio.SecurityApi().get_security_trades_by_symbol(
|
response = intrinio.SecurityApi().get_security_trades(
|
||||||
identifier, source, start_date=start_date, start_time=start_time,
|
source, start_date=start_date, start_time=start_time,
|
||||||
end_date=end_date, end_time=end_time, timezone=timezone,
|
end_date=end_date, end_time=end_time, timezone=timezone,
|
||||||
page_size=page_size, darkpool_only=darkpool_only, min_size=min_size,
|
page_size=page_size, darkpool_only=darkpool_only, min_size=min_size,
|
||||||
next_page=next_page
|
next_page=next_page
|
||||||
|
|||||||
@ -2970,6 +2970,7 @@ async def get_all_politician(api_key: str = Security(get_api_key)):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.get("/most-shorted-stocks")
|
@app.get("/most-shorted-stocks")
|
||||||
async def get_most_shorted_stocks(api_key: str = Security(get_api_key)):
|
async def get_most_shorted_stocks(api_key: str = Security(get_api_key)):
|
||||||
cache_key = f"most-shorted-stocks"
|
cache_key = f"most-shorted-stocks"
|
||||||
|
|||||||
@ -495,8 +495,8 @@ schedule.every(2).hours.do(run_threaded, run_fda_calendar).tag('fda_calendar_job
|
|||||||
schedule.every(3).hours.do(run_threaded, run_json_job).tag('json_job')
|
schedule.every(3).hours.do(run_threaded, run_json_job).tag('json_job')
|
||||||
schedule.every(6).hours.do(run_threaded, run_analyst_rating).tag('analyst_job')
|
schedule.every(6).hours.do(run_threaded, run_analyst_rating).tag('analyst_job')
|
||||||
|
|
||||||
schedule.every(10).seconds.do(run_threaded, run_cron_options_flow).tag('options_flow_job')
|
schedule.every(20).seconds.do(run_threaded, run_cron_options_flow).tag('options_flow_job')
|
||||||
schedule.every(10).seconds.do(run_threaded, run_cron_options_zero_dte).tag('options_zero_dte_job')
|
schedule.every(20).seconds.do(run_threaded, run_cron_options_zero_dte).tag('options_zero_dte_job')
|
||||||
|
|
||||||
|
|
||||||
# Run the scheduled jobs indefinitelyp
|
# Run the scheduled jobs indefinitelyp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user