Skip to content

Commit

Permalink
feat(client): add deleteJob to squashAndMerge
Browse files Browse the repository at this point in the history
PR Closed: Graviti-AI#1175
  • Loading branch information
graczhual committed Dec 22, 2021
1 parent ca62866 commit 4c501f8
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions tensorbay/client/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,6 @@ def _get_job(self, job_id: str) -> Dict[str, Any]:
"GET", f"jobs/{job_id}", self._dataset_id
).json()

def _delete_job(self, job_id: str) -> None:
"""Delete a :class:`Job`.
Arguments:
job_id: The Job id.
"""
self._client.open_api_do("DELETE", f"jobs/{job_id}", self._dataset_id)

def _generate_jobs(
self,
job_type: str,
Expand All @@ -668,6 +659,15 @@ def _generate_jobs(
"""

def delete_job(self, job_id: str) -> None:
"""Delete a :class:`Job`.
Arguments:
job_id: The Job id.
"""
self._client.open_api_do("DELETE", f"jobs/{job_id}", self._dataset_id)


class SquashAndMerge(JobMixin):
"""This class defines :class:`SquashAndMerge`.
Expand Down Expand Up @@ -772,11 +772,3 @@ def list_jobs(self, status: Optional[str] = None) -> PagingList[SquashAndMergeJo
The PagingList of SquashAndMergeJob.
"""

def delete_job(self, job_id: str) -> None:
"""Delete a :class:`SquashAndMergeJob`.
Arguments:
job_id: The SquashAndMergeJob id.
"""

0 comments on commit 4c501f8

Please sign in to comment.