Created
February 15, 2013 22:30
-
-
Save rday/4964113 to your computer and use it in GitHub Desktop.
Datecheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Verify that our benchmark msgpack file is up to date | |
bm_list = msgpack.loads(fp_bm.read()) | |
bm_date, _ = bm_list[len(bm_list)-1] | |
last_date = datetime(bm_date[0], bm_date[1], bm_date[2]) | |
today = datetime.today().replace(hour=0, minute=0, second=0, microsecond=0) | |
if last_date < today-timedelta(days=1): | |
update_benchmarks(last_date) | |
fp_bm = get_datafile('benchmark.msgpack', "rb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment