Skip to content

Commit 7993807

Browse files
authored
Add archive custom process to process service (#117)
1 parent c6f7e9c commit 7993807

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cirro/services/process.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import List, Optional
33

44
from cirro_api_client.v1.api.processes import get_processes, get_process, get_process_parameters, \
5-
validate_file_requirements
5+
validate_file_requirements, archive_custom_process
66
from cirro_api_client.v1.models import ValidateFileRequirementsRequest, Executor, Process, ProcessDetail
77

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

35+
def archive(self, process_id: str):
36+
"""
37+
Removes a custom process from the list of available processes.
38+
39+
Error will be raised if the requested process does not exist. No value
40+
is returned, and no error raised if process exists and request is satisfied.
41+
42+
Args:
43+
process_id (str): Process ID
44+
"""
45+
archive_custom_process.sync_detailed(process_id=process_id, client=self._api_client)
46+
3547
def find_by_name(self, name: str) -> Optional[ProcessDetail]:
3648
"""
3749
Get a process by its display name

0 commit comments

Comments
 (0)