diff --git a/PriceSystem/CalcCmdSender.py b/PriceSystem/CalcCmdSender.py index 671bfa6..9bed1af 100644 --- a/PriceSystem/CalcCmdSender.py +++ b/PriceSystem/CalcCmdSender.py @@ -90,7 +90,7 @@ def all_calc_cmd_finish(start_time): calc_command = fangjia.get_collection("fangjia_log", "calc_command", config.get_log_mongodb_host(), config.get_log_mongodb_port()) query = { - "status": 4, + "status": {"$in": [0, 1, 103]}, "c_date": { "$gt": start_time } @@ -109,7 +109,7 @@ if __name__ == "__main__": start_time = datetime.datetime.utcnow() send_district_calc_cmd() while not district_calc_cmd_finish(): - time.sleep(5) + time.sleep(10) logger.info("等待小区均价计算完成") send_city_calc_cmd() logger.info("城市均价计算完成") diff --git a/PriceSystem/fangjia/__init__.py b/PriceSystem/fangjia/__init__.py index 6ecd13e..0ca9f54 100644 --- a/PriceSystem/fangjia/__init__.py +++ b/PriceSystem/fangjia/__init__.py @@ -42,11 +42,6 @@ def get_performance_logger(name): logger.setLevel("INFO") return logger - now = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) - for day in range(1, 9): - if calendar.weekday(now.year, now.month, now.day) == 6: - break - now = now + datetime.timedelta(days=1) performance_logger = get_performance_logger("performance") @@ -61,7 +56,12 @@ def timer(func): arg_list = list() for arg in args: arg_list.append(str(arg)) +<<<<<<< HEAD performance_logger.info("函数名:%-20s\t耗时:%7.4f\t\t参数:(%s)" % (func.__name__, end - begin, arg_list)) +======= + if elapsed > config.get_timeout(): + performance_logger.info("函数名:%-20s\t耗时:%7.4f\t\t参数:(%s)" % (func.__name__, end - begin, arg_list)) +>>>>>>> e3a1832f8bd0e1fa8d774d73005729d3c862b083 return rs return _timer diff --git a/PriceSystem/fix/price_fix.py b/PriceSystem/fix/price_fix.py index b3c0d0f..7bab91c 100644 --- a/PriceSystem/fix/price_fix.py +++ b/PriceSystem/fix/price_fix.py @@ -14,7 +14,7 @@ from pandas import DataFrame,Series from numpy import row_stack,column_stack from dateutil.parser import parse import pandas -import matplotlib.pyplot as plt +# import matplotlib.pyplot as plt import numpy as np import numpy import collections