update cron job
This commit is contained in:
parent
aa14555076
commit
b08252f98f
@ -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)
|
||||||
|
|
||||||
|
|||||||
@ -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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user