From a4d078e0033b3e87d43c534132225a57c023cb00 Mon Sep 17 00:00:00 2001 From: higs4281 Date: Fri, 7 Oct 2016 17:23:58 -0400 Subject: [PATCH] Improve message posted when updating colleges This only affects a message a developer would seen when updating the colleges database. It notes an important constant that needs to be checked -- Salary year. It's a constant stored in the database, and it differs from the 'Latest year' constant, because salary data is always a couple years behind the rest of the data. --- paying_for_college/disclosures/scripts/update_colleges.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paying_for_college/disclosures/scripts/update_colleges.py b/paying_for_college/disclosures/scripts/update_colleges.py index 77d6131..c9baab2 100644 --- a/paying_for_college/disclosures/scripts/update_colleges.py +++ b/paying_for_college/disclosures/scripts/update_colleges.py @@ -13,7 +13,8 @@ from paying_for_college.disclosures.scripts import api_utils from paying_for_college.disclosures.scripts.api_utils import (MODEL_MAP, - LATEST_YEAR) + LATEST_YEAR, + LATEST_SALARY_YEAR) from paying_for_college.models import School, CONTROL_MAP DATESTAMP = datetime.datetime.now().strftime("%Y-%m-%d") @@ -43,9 +44,9 @@ def update(exclude_ids=[], single_school=None): FAILED = [] # failed to get a good API response NO_DATA = [] # API responded, but with no data CLOSED = 0 # schools that have closed since our last scrape - START_MSG = "Requesting school data from {0}." + START_MSG = "Requesting school data from {0} and salary data from {1}." JOB_MSG = "The job is paced for the Ed API, so it can take an hour to run." - print(START_MSG.format(LATEST_YEAR)) + print(START_MSG.format(LATEST_YEAR, LATEST_SALARY_YEAR)) if not single_school: print(JOB_MSG) UPDATED = False