Пример #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
Пример #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
Пример #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