Ejemplo n.º 1
0
def get_weixin_access_token_from_cache() -> str or None:
    weixin_access_token = redis_client.get(weixin_access_token_key)
    if weixin_access_token is None:
        return None
    weixin_access_token = weixin_access_token.decode()
    return weixin_access_token
Ejemplo n.º 2
0
def get_error_task_list_from_cache(owner: str, repo: str) -> dict:
    error_task_key = "{owner}/{repo}/sms/task/error".format(owner=owner,
                                                            repo=repo)
    cached_error_task_value = json.loads(
        redis_client.get(error_task_key).decode())
    return cached_error_task_value
Ejemplo n.º 3
0
def get_dingtalk_access_token_from_cache() -> str:
    dingtalk_access_token = redis_client.get(dingtalk_access_token_key)
    dingtalk_access_token = dingtalk_access_token.decode()
    return dingtalk_access_token