Upload

Upload models.

Upload the scene’s configuration file and asset file.

class rayvision_sync.upload.RayvisionUpload(api, db_config_path=None)

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.

Parameters:upload_json_path (str) – Upload json path.
Returns:Configuration file path.
Return type:str
load_db_config(db_config_path=None)
multi_thread_upload(upload_pool, thread_num=10)

muti thread upload resource.

Parameters:
  • upload_pool (list or tuple) – Store a list or ancestor of uploaded files.
  • thread_num (int) – Number of threads, 10 threads are enabled by default.
thread_pool_upload(upload_pool, pool_size=10)

Thread pool upload.

Parameters:
  • upload_pool (list or tuple) – store a list or ancestor of uploaded files.
  • pool_size (int) – thread pool size, default is 10 threads.
upload(task_id, task_json_path, tips_json_path, asset_json_path, upload_json_path, max_speed=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.
Returns:

True is success, False is failure.

Return type:

bool

upload_asset(**kwargs)

Handle.

upload_config(task_id, config_file_list, max_speed=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.
Returns:

True is success, False is failure.

Return type:

bool