Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion cirro/services/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List, Optional

from cirro_api_client.v1.api.processes import get_processes, get_process, get_process_parameters, \
validate_file_requirements
validate_file_requirements, archive_custom_process
from cirro_api_client.v1.models import ValidateFileRequirementsRequest, Executor, Process, ProcessDetail

from cirro.models.form_specification import ParameterSpecification
Expand Down Expand Up @@ -32,6 +32,18 @@ def get(self, process_id: str) -> ProcessDetail:
"""
return get_process.sync(process_id=process_id, client=self._api_client)

def archive(self, process_id: str):
"""
Removes a custom process from the list of available processes.

Error will be raised if the requested process does not exist. No value
is returned, and no error raised if process exists and request is satisfied.

Args:
process_id (str): Process ID
"""
archive_custom_process.sync_detailed(process_id=process_id, client=self._api_client)

def find_by_name(self, name: str) -> Optional[ProcessDetail]:
"""
Get a process by its display name
Expand Down