Skip to content

Instantly share code, notes, and snippets.

@rday
Created February 15, 2013 22:30
Show Gist options
  • Save rday/4964113 to your computer and use it in GitHub Desktop.
Save rday/4964113 to your computer and use it in GitHub Desktop.
Datecheck
# 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