REST API - Tasks¶
- class iceprod.rest.handlers.tasks.MultiTasksHandler(*args, **kwargs)[source]¶
Handle multi tasks requests.
- async get()[source]¶
Get task entries.
- Params (optional):
status: | separated list of task status to filter by site: site to filter on keys: | separated list of keys to return for each task sort: | separated list of sort key=values, with values of 1 or -1 limit: number of tasks to return
- Returns:
{‘tasks’: [<task>]}
- Return type:
- class iceprod.rest.handlers.tasks.TasksHandler(*args, **kwargs)[source]¶
Handle single task requests.
- class iceprod.rest.handlers.tasks.TasksStatusHandler(*args, **kwargs)[source]¶
Handle single task requests.
- class iceprod.rest.handlers.tasks.TaskCountsStatusHandler(*args, **kwargs)[source]¶
Handle task summary grouping by status.
- class iceprod.rest.handlers.tasks.DatasetMultiTasksHandler(*args, **kwargs)[source]¶
Handle multi tasks requests.
- class iceprod.rest.handlers.tasks.DatasetTasksHandler(*args, **kwargs)[source]¶
Handle single task requests.
- class iceprod.rest.handlers.tasks.DatasetTasksStatusHandler(*args, **kwargs)[source]¶
Handle single task requests.
- class iceprod.rest.handlers.tasks.DatasetTasksForceStatusHandler(*args, **kwargs)[source]¶
Handle single task requests.
- class iceprod.rest.handlers.tasks.DatasetTaskSummaryStatusHandler(*args, **kwargs)[source]¶
Handle task summary grouping by status.
- class iceprod.rest.handlers.tasks.DatasetTaskCountsStatusHandler(*args, **kwargs)[source]¶
Handle task summary grouping by status.
- class iceprod.rest.handlers.tasks.DatasetTaskCountsNameStatusHandler(*args, **kwargs)[source]¶
Handle task summary grouping by name and status.
- class iceprod.rest.handlers.tasks.DatasetTaskStatsHandler(*args, **kwargs)[source]¶
Handle task stats
- class iceprod.rest.handlers.tasks.TasksActionsWaitingHandler(*args, **kwargs)[source]¶
Handle task action for idle -> waiting.
- class iceprod.rest.handlers.tasks.TasksActionsQueueHandler(*args, **kwargs)[source]¶
Handle task action for waiting -> queued.
- class iceprod.rest.handlers.tasks.TasksActionsProcessingHandler(*args, **kwargs)[source]¶
Handle task action for queued -> processing.
- class iceprod.rest.handlers.tasks.TasksActionsErrorHandler(*args, **kwargs)[source]¶
Handle task action on error (* -> waiting).
- final_status = 'waiting'¶
- async post(task_id)[source]¶
Take one task, set its status to waiting.
- Parameters:
task_id (str) – task id
- Body args (json):
instance_id (str): task instance id time_used (int): (optional) time used to run task, in seconds resources (dict): (optional) resources used by task site (str): (optional) site the task was running at reason (str): (optional) reason for error
- Returns:
<task dict>
- Return type:
- class iceprod.rest.handlers.tasks.TasksActionsFailedHandler(*args, **kwargs)[source]¶
- final_status = 'failed'¶
- class iceprod.rest.handlers.tasks.TasksActionsCompleteHandler(*args, **kwargs)[source]¶
Handle task action on processing -> complete.
- async post(task_id)[source]¶
Take one task, set its status to complete.
- Parameters:
task_id (str) – task id
- Body args (json):
instance_id (str): task instance id time_used (int): (optional) time used to run task, in seconds site (str): (optional) site the task was running at
- Returns:
<task dict>
- Return type:
- class iceprod.rest.handlers.tasks.TaskBulkStatusHandler(*args, **kwargs)[source]¶
Update the status of multiple tasks at once.
- class iceprod.rest.handlers.tasks.DatasetTaskBulkStatusHandler(*args, **kwargs)[source]¶
Update the status of multiple tasks at once.
- class iceprod.rest.handlers.tasks.DatasetTaskBulkSuspendHandler(*args, **kwargs)[source]¶
Perform a suspend of all tasks in a dataset.
- class iceprod.rest.handlers.tasks.DatasetTaskBulkResetHandler(*args, **kwargs)[source]¶
Perform a reset of all tasks in a dataset.
- class iceprod.rest.handlers.tasks.DatasetTaskBulkHardResetHandler(*args, **kwargs)[source]¶
Perform a hard reset of all tasks in a dataset.
- class iceprod.rest.handlers.tasks.DatasetTaskBulkRequirementsHandler(*args, **kwargs)[source]¶
Update the requirements of multiple tasks at once.
- class iceprod.rest.handlers.tasks.DatasetMultiFilesHandler(*args, **kwargs)[source]¶
Handle multi files requests, by dataset.
- async post(dataset_id)[source]¶
Create a dataset_files entry.
Body should contain the file data.
- Parameters:
filename (str) – the full url filename
movement (str) – [input | output | both]
job_index (int) – the job index to add to
task_name (str) – the name of the task
local (str) – (optional) the local filename the task sees
transfer (str) – whether to transfer the file (can be bool or str)
compression (str) – whether to automatically compress/decompress the file
- Returns:
{‘result’: <task_id>}
- Return type:
- class iceprod.rest.handlers.tasks.DatasetTaskFilesHandler(*args, **kwargs)[source]¶
Handle multi files requests, by task.