update cron job

This commit is contained in:
MuslemRahimi 2025-01-29 16:50:09 +01:00
parent aa14555076
commit b08252f98f
2 changed files with 22 additions and 20 deletions

View File

@ -165,7 +165,8 @@ async def get_data():
for address in [details, location]: for address in [details, location]:
if any(place in address for place in ["White House", "Blair House","Washington DC"]): try:
if any(place in address for place in ["White House", "Blair House","Washington DC", "East Room"]):
location = "Washington, DC" location = "Washington, DC"
else: else:
location = address # Otherwise, use the full address string location = address # Otherwise, use the full address string
@ -184,13 +185,15 @@ async def get_data():
longitude = location_data.longitude longitude = location_data.longitude
print(f"Latitude: {latitude}, Longitude: {longitude}") print(f"Latitude: {latitude}, Longitude: {longitude}")
break break
except:
pass
for item in data: for item in data:
for price_item in sp500_list: for price_item in sp500_list:
if item['date'] == price_item['date']: if item['date'] == price_item['date']:
item['changesPercentage'] = price_item['changesPercentage'] item['changesPercentage'] = price_item['changesPercentage']
break break
print(city)
res_dict = {'returnSince': return_since,'city': city, 'lon': longitude, 'lat': latitude, 'history': data, 'billData': bill_data} res_dict = {'returnSince': return_since,'city': city, 'lon': longitude, 'lat': latitude, 'history': data, 'billData': bill_data}
save_json(res_dict) save_json(res_dict)

View File

@ -382,7 +382,6 @@ schedule.every().day.at("10:00").do(run_threaded, run_fda_calendar).tag('fda_job
schedule.every().day.at("12:00").do(run_threaded, run_market_cap).tag('market_cap_job') schedule.every().day.at("12:00").do(run_threaded, run_market_cap).tag('market_cap_job')
#schedule.every().day.at("05:00").do(run_threaded, run_implied_volatility).tag('implied_volatility_job')
schedule.every().day.at("13:40").do(run_threaded, run_analyst_estimate).tag('analyst_estimate_job') schedule.every().day.at("13:40").do(run_threaded, run_analyst_estimate).tag('analyst_estimate_job')