| | |
| | | |
| | | # 统计今日卖出 |
| | | # 统计今日买入 |
| | | import ths_util |
| | | import tool |
| | | from code_data_util import ZYLTGBUtil |
| | | |
| | |
| | | if float(data["zyltgb"]) > 0: |
| | | _list.append(_dict) |
| | | # 保存10天 |
| | | ZYLTGBUtil.save(data["code"],data["zyltgb"],data["zyltgb_unit"]) |
| | | ZYLTGBUtil.save(data["code"], data["zyltgb"], data["zyltgb_unit"]) |
| | | mongo_data.save("ths-zylt", _list) |
| | | |
| | | |
| | |
| | | return |
| | | redis = __redisManager.getRedis(); |
| | | redis.setex("client-active-{}".format(client_id), 10, json.dumps((host, thsDead))) |
| | | ths_util.set_ths_dead_state(client_id, thsDead) |
| | | |
| | | |
| | | def getValidL2Clients(): |
| | |
| | | client_ids = [] |
| | | for k in keys: |
| | | _id = k.split("client-active-")[1] |
| | | client_ids.append(_id) |
| | | # 客户端同花顺没卡死才能加入 |
| | | if not ths_util.is_ths_dead(_id): |
| | | client_ids.append(_id) |
| | | l2_clients = authority.get_l2_clients() |
| | | |
| | | return list(set(client_ids).intersection(set(l2_clients))) |