This commit is contained in:
2018-03-12 13:46:11 +08:00
parent a8c95698cd
commit 6c8ac1d50f
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ def worker():
def format_cmd(cmd):
cmd = json.loads(cmd)
cmd["weekend"] = datetime.datetime.strptime(cmd["weekend"], "%Y-%m-%d %H:%M:%S")
cmd["weekend"] = datetime.datetime.strptime(cmd["weekend"], "%Y-%m-%d")
pacific = pytz.timezone('Asia/Shanghai')
cmd["weekend"] = pacific.localize(cmd["weekend"])
return cmd
+2 -1
View File
@@ -41,6 +41,7 @@ def send_cmd(seaweed):
logger.info("命令发送成功:" + json_cmd)
def send_district_calc_cmd():
for city in fangjia.get_all_city():
for seaweed in get_district(city):
@@ -85,7 +86,7 @@ def district_calc_cmd_finish():
if __name__ == "__main__":
# send_district_calc_cmd()
send_district_calc_cmd()
while not district_calc_cmd_finish():
time.sleep(5)
logger.info("等待小区均价计算完成")
+1 -1
View File
@@ -8,7 +8,7 @@ def get_logging_config():
def get_worker_num():
return 20
return 10
def get_redis_host():