Upload¶
Upload models.
Upload the scene’s configuration file and asset file.
- class rayvision_sync.upload.RayvisionUpload(api, db_config_path=None, transports_json='', transmitter_exe='', automatic_line=True, internet_provider='', logger=None, log_folder=None, log_name=None, log_level='DEBUG')¶
Bases:
object
Upload files.
Upload configuration files and asset files.
- check_transfer_log_path(transfer_log_path)¶
Check the log location of the transport engine.
- create_db_ini(upload_json_path)¶
Create the database configuration file.
- load_db_config(db_config_path=None)¶
- thread_pool_upload(upload_pool, pool_size=10, **kwargs)¶
Thread pool upload.
- upload(task_id, task_json_path, tips_json_path, asset_json_path, upload_json_path, max_speed=None, transmit_type='upload_json', engine_type='aspera', server_ip=None, server_port=None, network_mode=0, is_record=False, redis_flag=None, redis_obj=None, proxy_ip=None, proxy_port=None)¶
Run the cmd command to upload the configuration file.
- Parameters:
task_id (str, optional) – Task id.
task_json_path (str, optional) – task.json file absolute path.
tips_json_path (str, optional) – tips.json file absolute path.
asset_json_path (str, optional) – asset.json file absolute path.
upload_json_path (str, optional) – upload.json file absolute path.
max_speed (str) – Maximum transmission speed, default value is 1048576 KB/S.
transmit_type (str) – transmit type: 1. upload_json: upload from json file,in this type, next remote will not used. 2. upload_list: upload from file list.
engine_type (str, optional) – set engine type, support “aspera” and “raysyncproxy”, 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.
network_mode (int) – network mode: 0: auto selected, default; 1: tcp; 2: udp;
is_record (bool) – Whether to save upload records. default False.
redis_flag (str) – Save uploaded Redis database tag name.
redis_obj (object) – redis database object.
proxy_ip (str) – proxy ip, only supports raysyncproxy engine eg:10.14.88.66.
proxy_port (str) – proxy port, only supports raysyncproxy engine eg:5555.
- Returns:
True is success, False is failure.
- Return type:
- upload_asset(**kwargs)¶
Handle.
- upload_config(task_id, config_file_list, max_speed=None, engine_type='aspera', server_ip=None, server_port=None, network_mode=0, proxy_ip=None, proxy_port=None)¶
Run the cmd command to upload configuration profiles.
- Parameters:
task_id (str) – Task id.
config_file_list (list) – Configuration file path list.
max_speed (str) – Maximum transmission speed, default value is 1048576 KB/S.
engine_type (str, optional) – set engine type, support “aspera” and “raysyncproxy”, 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.
network_mode (int) – network mode: 0: auto selected, default; 1: tcp; 2: udp;
proxy_ip (str) – proxy ip, only supports raysyncproxy engine eg:10.14.88.66.
proxy_port (str) – proxy port, only supports raysyncproxy engine eg:5555.
- Returns:
True is success, False is failure.
- Return type: