RayvisionTransfer Class

Transfer Module.

Execute the cmd command to make the last asset and download assets.

class rayvision_sync.transfer.RayvisionTransfer(config_bid, input_bid, domain, platform, local_os, user_id, output_bid=None, manage_task=None)

Bases: object

Transfer including upload files and download files.

create_cmd(cmd_params, db_ini_path=None, engine_type='aspera', server_ip=None, server_port=None)

Splice a cmd command.

Parameters:
  • cmd_params (list) –

    Parameters required by the cmd command. Examples:

    [
        transmit_type, # Transmission type
        local_path, # Local file path
        output_file_name, # File path uploaded to the server
        max_speed, # Maximum transfer speed of upload
        'true', # Whether to save the path
        'output_bid', # Transfer id
    ]
    
  • db_ini_path (str) – Database path.
  • engine_type (str, optional) – set engine type, support “aspera” and “raysync”, Default “aspera”.
  • server_ip (str, optional) – transmit server host, if not set, it is obtained from the default transport profile.
  • server_port (str, optional) – transmit server port, if not set, it is obtained from the default transport profile.
Returns:

Cmd command.

Return type:

str

static init_transmitter(current_dir, local_os)

Gets the path of the transfer software.

Parameters:
  • current_dir – transfer base directory.
  • local_os – system name, Only support “window” or “linux”

Returns: transfer software absolute path.

parse_transports_json(transports_json=None, domain=None, platform=None)

Analyze transports.json,obtain transfer server info.

Extract the transmission configuration information of the corresponding platform in transports.json.

Parameters:
  • transports_json (str, optional) – Path to transfer configuration files.
  • domain (str, optional) – Domain name.
  • platform (str, optional) – Platform number.
Returns:

Transfer configuration information
.e.g:
{

“engine_type”:”aspera”, “server_name”:”HKCT”, “server_ip”:”render-client.raysync.cn”, “server_port”:”10221”

}

Return type:

dict