RayvisionTransfer Class¶
Transfer Module.
Execute the cmd command to make the last asset and download assets.
-
class
rayvision_sync.transfer.
RayvisionTransfer
(api, config_bid, input_bid, domain, platform, local_os, user_id, automatic_line, output_bid=None, manage_task=None, transports_json='', transmitter_exe='', internet_provider='')¶ 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, main_user_id=None, main_input_bid=None, network_mode=0)¶ 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 “raysyncweb”, 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.
- main_user_id (str) – Main account user id.
- main_input_bid (str) – Main account input bid.
- network_mode (int) – network mode: 0: auto selected, default; 1: tcp; 2: udp;
Returns: Cmd command.
Return type: - cmd_params (list) –
-
init_transmitter
()¶ Gets the path of the transfer software.
Parameters: current_dir – transfer base directory. Returns: transfer software absolute path.
-
parse_service_transfe_line
(internet_provider=None)¶
-
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: Returns: - Transfer configuration information
- .e.g:
- {
“engine_type”:”aspera”, “server_name”:”HKCT”, “server_ip”:”render-client.raysync.cn”, “server_port”:”10221”
}
Return type:
-