Skip to content

Commit

Permalink
Improve message posted when updating colleges
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
higs4281 committed Oct 7, 2016
1 parent ab067bb commit a4d078e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions paying_for_college/disclosures/scripts/update_colleges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a4d078e

Please sign in to comment.