| | |
| | | import time |
| | | |
| | | # 活动时间 |
| | | from code_atrribute import gpcode_manager |
| | | from huaxin_client.code_queue_distribute_manager import CodeDataCallbackDistributeManager |
| | | from log_module.async_log_util import huaxin_l2_log |
| | | from log_module.log import logger_local_huaxin_l2_error |
| | | import collections |
| | | |
| | | from utils import middle_api_protocol |
| | | |
| | | order_detail_upload_active_time_dict = {} |
| | | transaction_upload_active_time_dict = {} |
| | |
| | | |
| | | def add_subscript_codes(codes): |
| | | # 加入上传队列 |
| | | common_queue.put(('', "l2_subscript_codes", list(codes))) |
| | | # common_queue.put(('', "l2_subscript_codes", list(codes))) |
| | | # 上传数据 |
| | | if codes: |
| | | fresults = [] |
| | | for code in codes: |
| | | code_name = gpcode_manager.CodesNameManager.get_code_name(code) |
| | | fresults.append((code, code_name)) |
| | | fdata = middle_api_protocol.load_l2_position_subscript_codes(fresults) |
| | | middle_api_protocol.request(fdata) |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | add_subscript_codes(["000333"]) |