Quanlse/QTask.py
def _getSTSToken():
    """
    Get the token to upload the file

    :return:
    """

    if not Define.hubToken:
        raise Error.ArgumentError("please provide a valid token")

    config = invokeBackend("circuit/genSTS", {"token": Define.hubToken})

    bosClient = BosClient(
        BceClientConfiguration(
            credentials=BceCredentials(
                str(
                    config['accessKeyId']),
                str(
                    config['secretAccessKey'])),
            endpoint='http://bd.bcebos.com',
            security_token=str(
                config['sessionToken'])))

    return [Define.hubToken, bosClient, config['dest']]

    Get the token to upload the file

    :return:
    
Get the token to upload the file
Get the token to upload the file
def _getSTSToken():
    if not Define.hubToken:
        raise Error.ArgumentError("please provide a valid token")
    config = invokeBackend("circuit/genSTS", {"token": Define.hubToken})
    bosClient = BosClient(
        BceClientConfiguration(
            credentials=BceCredentials(
                str(
                    config['accessKeyId']),
                str(
                    config['secretAccessKey'])),
            endpoint='http://bd.bcebos.com',
            security_token=str(
                config['sessionToken'])))
    return [Define.hubToken, bosClient, config['dest']]
def _getSTSToken ( ) : if not Define . hubToken : raise Error . ArgumentError ( "please provide a valid token" ) config = invokeBackend ( "circuit/genSTS" , { "token" : Define . hubToken } ) bosClient = BosClient ( BceClientConfiguration ( credentials = BceCredentials ( str ( config [ 'accessKeyId' ] ) , str ( config [ 'secretAccessKey' ] ) ) , endpoint = 'http://bd.bcebos.com' , security_token = str ( config [ 'sessionToken' ] ) ) ) return [ Define . hubToken , bosClient , config [ 'dest' ] ]
Get the token to upload the file
Get the token to upload the file
"""
    Get the token to upload the file

    :return:
    """
None