| | |
| | | |
| | | import constant |
| | | from code_attribute import gpcode_manager |
| | | from db.redis_manager import RedisUtils |
| | | from db.redis_manager_delegate import RedisUtils |
| | | from l2 import l2_data_log, l2_data_source_util |
| | | from log_module import log, log_export |
| | | from db import redis_manager |
| | | from db import redis_manager_delegate as redis_manager |
| | | from utils import tool |
| | | |
| | | _redisManager = redis_manager.RedisManager(1) |
| | |
| | | RedisUtils.setex(redis_instance, key, expire, json.dumps(json_value), auto_free=False) |
| | | finally: |
| | | RedisUtils.delete(redis_instance, "l2-save-{}".format(code), auto_free=False) |
| | | redis_instance.connection_pool.disconnect() |
| | | RedisUtils.realse(redis_instance) |
| | | |
| | | print("保存新数据用时:", msg, "耗时:{}".format(round(time.time() * 1000) - start_time)) |
| | | return datas |