From d253c17cae80aab0340965a2bd161f1aea95d180 Mon Sep 17 00:00:00 2001 From: "wangwenyan@fangjia.com" Date: Mon, 9 Apr 2018 15:04:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=9D=87=E4=BB=B7=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=91=BD=E4=BB=A4=E5=8F=91=E9=80=81=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/CalcCmdSender.py | 12 ++++++------ PriceSystem/fangjia/__init__.py | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/PriceSystem/CalcCmdSender.py b/PriceSystem/CalcCmdSender.py index abb7743..671bfa6 100644 --- a/PriceSystem/CalcCmdSender.py +++ b/PriceSystem/CalcCmdSender.py @@ -106,12 +106,12 @@ def all_calc_cmd_finish(start_time): if __name__ == "__main__": - # start_time = datetime.datetime.utcnow() - # send_district_calc_cmd() - # while not district_calc_cmd_finish(): - # time.sleep(5) - # logger.info("等待小区均价计算完成") + start_time = datetime.datetime.utcnow() + send_district_calc_cmd() + while not district_calc_cmd_finish(): + time.sleep(5) + logger.info("等待小区均价计算完成") send_city_calc_cmd() logger.info("城市均价计算完成") - # all_calc_cmd_finish(start_time) + all_calc_cmd_finish(start_time) sys.exit(0) diff --git a/PriceSystem/fangjia/__init__.py b/PriceSystem/fangjia/__init__.py index 6893b60..7f38106 100644 --- a/PriceSystem/fangjia/__init__.py +++ b/PriceSystem/fangjia/__init__.py @@ -134,7 +134,6 @@ def get_weekend(): if calendar.weekday(now.year, now.month, now.day) == 6: break now = now + datetime.timedelta(days=1) - now = now - datetime.timedelta(days=14) pacific = pytz.timezone('Asia/Shanghai') return pacific.localize(now)