update timer
This commit is contained in:
parent
3cea1b06bc
commit
61f9588652
@ -57,10 +57,11 @@ def run_command(command):
|
||||
if stderr:
|
||||
logger.error("Error:\n" + stderr)
|
||||
|
||||
def run_json_job():
|
||||
def run_json():
|
||||
# Run the asynchronous function inside an asyncio loop
|
||||
run_command(["python3", "restart_json.py"])
|
||||
run_command(["pm2", "restart","fastapi"])
|
||||
run_command(["pm2", "restart","fastify"])
|
||||
|
||||
def run_pocketbase():
|
||||
# Run the asynchronous function inside an asyncio loop
|
||||
@ -596,7 +597,7 @@ schedule.every(15).minutes.do(run_threaded, run_market_moods).tag('market_moods_
|
||||
#schedule.every(10).minutes.do(run_threaded, run_dark_pool_flow).tag('dark_pool_flow_job')
|
||||
|
||||
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(2).hours.do(run_threaded, run_json).tag('json_job')
|
||||
#schedule.every(4).hours.do(run_threaded, run_share_statistics).tag('share_statistics_job')
|
||||
schedule.every(6).hours.do(run_threaded, run_analyst_rating).tag('analyst_job')
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ def run_json_job():
|
||||
# Run the asynchronous function inside an asyncio loop
|
||||
subprocess.run(["python3", "restart_json.py"])
|
||||
subprocess.run(["pm2", "restart","fastapi"])
|
||||
subprocess.run(["pm2", "restart","fastify"])
|
||||
|
||||
|
||||
# Create functions to run each schedule in a separate thread
|
||||
@ -42,7 +43,7 @@ def run_threaded(job_func):
|
||||
|
||||
|
||||
schedule.every().day.at("15:45").do(run_threaded, run_restart_cache)
|
||||
schedule.every(3).hours.do(run_threaded, run_json_job).tag('json_job')
|
||||
schedule.every(2).hours.do(run_threaded, run_json_job).tag('json_job')
|
||||
|
||||
while True:
|
||||
schedule.run_pending()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user