| | |
| | | import constant |
| | | from code_attribute import global_data_loader, code_volumn_manager, first_target_code_data_processor, gpcode_manager |
| | | from code_attribute.code_data_util import ZYLTGBUtil |
| | | from code_attribute.today_max_price_manager import MaxPriceInfoManager |
| | | from db import redis_manager_delegate as redis_manager |
| | | from log_module import async_log_util |
| | | from log_module.log import logger_l2_codes_subscript, logger_debug |
| | |
| | | if zylt_volume and price > 0: |
| | | zylt = zylt_volume * price |
| | | if not zylt: |
| | | try: |
| | | __start_time = time.time() |
| | | zylt = kpl_api.getZYLTAmount(code) |
| | | async_log_util.info(logger_l2_codes_subscript, |
| | | f"{request_id} {code}获取自由流通市值耗时-{round((time.time() - __start_time) * 1000)}ms") |
| | | # 保存自由流通股本 |
| | | if zylt: |
| | | ZYLTGBUtil.save_async(code, zylt, price) |
| | | except: |
| | | pass |
| | | # 默认20亿 |
| | | zylt = 20 * 1e8 |
| | | if zylt: |
| | | limit_up_price = gpcode_manager.get_limit_up_price(code) |
| | | if not limit_up_price: |
| | |
| | | global_util.zyltgb_map[code] = int(zylt) |
| | | # 保存今日实时量 |
| | | temp_volumns.append((code, d[3])) |
| | | |
| | | zyltgb = 0 |
| | | if code in global_util.zyltgb_map: |
| | | zyltgb = global_util.zyltgb_map[code] |
| | |
| | | yesterday_codes = kpl_data_manager.get_yesterday_limit_up_codes() |
| | | if yesterday_codes is None: |
| | | yesterday_codes = set() |
| | | current_price_process_manager.accept_prices(tick_datas, request_id, in_blocks, yesterday_codes, top_out_blocks=out_blocks) |
| | | current_price_process_manager.accept_prices(tick_datas, request_id, in_blocks, yesterday_codes, |
| | | top_out_blocks=out_blocks) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | finally: |