Administrator
2023-08-03 4d321ae069fce2c0f6f7884bec8fa6c4ec534d1a
inited_data.py
@@ -36,17 +36,23 @@
# 设置账户信息
def setAccountInfo(accountId, strategyId, token):
    redis = redisManager.getRedis()
    RedisUtils.set(redis, "juejin-account-id", accountId)
    RedisUtils.set(redis, "juejin-strategy-id", strategyId)
    RedisUtils.set(redis, "juejin-token", token)
    try:
        RedisUtils.set(redis, "juejin-account-id", accountId, auto_free=False)
        RedisUtils.set(redis, "juejin-strategy-id", strategyId, auto_free=False)
        RedisUtils.set(redis, "juejin-token", token, auto_free=False)
    finally:
        redis.connection_pool.disconnect()
def getAccountInfo():
    redis = redisManager.getRedis()
    account_id = RedisUtils.get(redis, "juejin-account-id")
    strategy_id = RedisUtils.get(redis, "juejin-strategy-id")
    token = RedisUtils.get(redis, "juejin-token")
    return account_id, strategy_id, token
    try:
        account_id = RedisUtils.get(redis, "juejin-account-id", auto_free=False)
        strategy_id = RedisUtils.get(redis, "juejin-strategy-id", auto_free=False)
        token = RedisUtils.get(redis, "juejin-token", auto_free=False)
        return account_id, strategy_id, token
    finally:
        redis.connection_pool.disconnect()
def init_data():