How to use the funcx.sdk.config.write_option function in funcx

To help you get started, we’ve selected a few funcx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github funcx-faas / funcX / funcx / sdk / utils / auth.py View on Github external
def _store_config(token_response):
    """
    Store the tokens on disk.

    Args:
        token_response (OAuthTokenResponse): Response from a token request
    """
    tkn = token_response.by_resource_server

    funcx_at = tkn['funcx_service']['access_token']
    funcx_rt = tkn['funcx_service']['refresh_token']
    funcx_at_expires = tkn['funcx_service']['expires_at_seconds']

    write_option(FUNCX_RT_OPTNAME, funcx_rt)
    write_option(FUNCX_AT_OPTNAME, funcx_at)
    write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)
github funcx-faas / funcX / funcx / sdk / utils / auth.py View on Github external
def _store_config(token_response):
    """
    Store the tokens on disk.

    Args:
        token_response (OAuthTokenResponse): Response from a token request
    """
    tkn = token_response.by_resource_server

    funcx_at = tkn['funcx_service']['access_token']
    funcx_rt = tkn['funcx_service']['refresh_token']
    funcx_at_expires = tkn['funcx_service']['expires_at_seconds']

    write_option(FUNCX_RT_OPTNAME, funcx_rt)
    write_option(FUNCX_AT_OPTNAME, funcx_at)
    write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)
github funcx-faas / funcX / funcx / sdk / utils / auth.py View on Github external
def _store_config(token_response):
    """
    Store the tokens on disk.

    Args:
        token_response (OAuthTokenResponse): Response from a token request
    """
    tkn = token_response.by_resource_server

    funcx_at = tkn['funcx_service']['access_token']
    funcx_rt = tkn['funcx_service']['refresh_token']
    funcx_at_expires = tkn['funcx_service']['expires_at_seconds']

    write_option(FUNCX_RT_OPTNAME, funcx_rt)
    write_option(FUNCX_AT_OPTNAME, funcx_at)
    write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)