fix bug
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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("等待小区均价计算完成")
|
||||
|
||||
@@ -8,7 +8,7 @@ def get_logging_config():
|
||||
|
||||
|
||||
def get_worker_num():
|
||||
return 20
|
||||
return 10
|
||||
|
||||
|
||||
def get_redis_host():
|
||||
|
||||
Reference in New Issue
Block a user