Task

Interface to operate on the task.

class rayvision_api.operators.task.TaskOperator(connect)

Bases: object

API task related operations.

TASK_PARAM = 'taskIds'
abort_task(task_param_list)

Give up the task.

Parameters:task_param_list (list) – Task ID list.
create_task(count=1, task_user_level=50, out_user_id=None, labels=None, clone_original_id=None, artist=None)

Create a task ID.

Parameters:
  • count (int, optional) – The quantity of task ID.
  • task_user_level (int) – Set the user’s task level to either 50 or 60, default is 50.
  • out_user_id (int, optional) – Non-required, external user ID, used to distinguish users accessing third parties.
  • labels (list or tuple, optional) – Custom task labels.
  • clone_original_id (int, optional) – Clone the original task ID.
  • artist (str, optional) – producer.
Returns:

The information of the task.
e.g.:
{

“taskIdList”: [1658434], “aliasTaskIdList”: [2W1658434], “userId”: 100093088

}

Return type:

dict

delete_task(task_param_list)

Delete task.

Parameters:task_param_list (list) – Task ID list.
full_speed(task_id_list)

Full to render.

Parameters:
  • task_id_list (list of int) – Task list.
  • Example
    {
    “taskIds”:[485],

    }

set_task_overtime_top(task_id_list, overtime)

Set the task timeout stop time.

Parameters:
  • task_id_list (list of int) – Task list.
  • overtime (int or float) – Timeout time, unit: second.
  • Example
    {
    “taskIds”:[485], “overTime”:1800

    }

start_task(task_param_list)

Start task.

Parameters:task_param_list (list) – Task ID list.
stop_task(task_param_list)

Stop the task.

Parameters:task_param_list (list) – Task ID list.
submit_task(task_id, producer=None, only_id=False)

Submit a task to rayvision render farm.

Parameters:
  • task_id (int) – Submit task ID.
  • producer (str, optional) – Producer.
task_id

The ID number of the render task.

Notes

As long as we do not initialize the class again or submit the task successfully, we can always continue to get the task id from the class instance.

Type:int
update_priority(task_id, priority)

Update the render priority for the task by given task id.

Parameters:
  • task_id (int) – The ID number of the render task.
  • priority (int) – The priority for the current render task.