From e9726ecc89b10c76798a2448b13cac84a2f47b6a Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 5 Feb 2020 18:45:07 +0100 Subject: [PATCH] (minor) rm print time --- search/models/history.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/search/models/history.py b/search/models/history.py index bc61764f..ac1ee000 100644 --- a/search/models/history.py +++ b/search/models/history.py @@ -333,7 +333,7 @@ def history(year=None, month=None, page=None, page_size=PAGE_SIZE): assert year assert month entries = [] - beg = pendulum.now() + # beg = pendulum.now() try: entries = EntryCopies.objects.order_by("-created").filter(created__year=year).filter(created__month=month) except Exception as e: @@ -355,7 +355,7 @@ def history(year=None, month=None, page=None, page_size=PAGE_SIZE): TWO_DIGITS_SPEC = '0>2' YMD = '%Y-%M-%d' # for datetime it is %m for day in range(1, last_day + 1): - start = pendulum.now() + # start = pendulum.now() date = "{}-{}-{}".format(year, format(month, TWO_DIGITS_SPEC), format(day, TWO_DIGITS_SPEC)) @@ -376,11 +376,11 @@ def history(year=None, month=None, page=None, page_size=PAGE_SIZE): 'weekday': date_obj.weekday(), 'nb_entered': len(entries_this_day), 'price_entered': price_entered}) - end = pendulum.now() - print("------- for day {}: {}".format(day, end - start)) + # end = pendulum.now() + # print("------- for day {}: {}".format(day, end - start)) - en = pendulum.now() - print("--- entries search took {}".format(beg, en)) + # en = pendulum.now() + # print("--- entries search took {}".format(en - beg)) return {'entries': entries, 'nb_entries': nb_entries,