| | |
| | | |
| | | redis = __redisManager.getRedis() |
| | | redis.setex("client-active-{}".format(client_id), 10, json.dumps((host, thsDead))) |
| | | ths_util.set_ths_dead_state(client_id, thsDead) |
| | | if ths_util: |
| | | ths_util.set_ths_dead_state(client_id, thsDead) |
| | | |
| | | |
| | | # 获取客户端同花顺状态 |
| | | def getTHSState(client_id): |
| | | redis = __redisManager.getRedis(); |
| | | redis = __redisManager.getRedis() |
| | | val = redis.get("client-active-{}".format(client_id)) |
| | | if val is None: |
| | | return None |
| | |
| | | for d in add_code_list: |
| | | limit_up_price = gpcode_manager.get_limit_up_price(d) |
| | | limit_up_price = round(float(limit_up_price), 2) |
| | | min_volume = 50 * 10000 // limit_up_price |
| | | min_volume = int(round(50 * 10000 / limit_up_price)) |
| | | add_datas.append((d, min_volume, limit_up_price)) |
| | | try: |
| | | huaxin_target_codes_manager.push(add_datas) |