Skip to content

Commit

Permalink
Add run, build delete to client
Browse files Browse the repository at this point in the history
  • Loading branch information
Jkuzz committed Oct 5, 2023
1 parent 7df2ca1 commit 1f65216
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/apify_client/clients/resource_clients/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ def get(self) -> Optional[Dict]:
"""
return self._get()

def delete(self) -> None:
"""Delete the run
TODO: Docs
"""
return self._delete()

def abort(self) -> Dict:
"""Abort the actor build which is starting or currently running and return its details.
Expand Down Expand Up @@ -76,6 +83,13 @@ async def abort(self) -> Dict:
"""
return await self._abort()

async def delete(self) -> None:
"""Delete the run
TODO: Docs
"""
return await self._delete()

async def wait_for_finish(self, *, wait_secs: Optional[int] = None) -> Optional[Dict]:
"""Wait synchronously until the build finishes or the server times out.
Expand Down
14 changes: 14 additions & 0 deletions src/apify_client/clients/resource_clients/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def update(self, *, status_message: Optional[str] = None, is_status_message_term

return self._update(filter_out_none_values_recursively(updated_fields))

def delete(self)-> None:
"""Delete the run
TODO: Docs
"""
return self._delete()

def abort(self, *, gracefully: Optional[bool] = None) -> Dict:
"""Abort the actor run which is starting or currently running and return its details.
Expand Down Expand Up @@ -283,6 +290,13 @@ async def wait_for_finish(self, *, wait_secs: Optional[int] = None) -> Optional[
"""
return await self._wait_for_finish(wait_secs=wait_secs)

async def delete(self)-> None:
"""Delete the run
TODO: Docs
"""
return await self._delete()

async def metamorph(
self,
*,
Expand Down

0 comments on commit 1f65216

Please sign in to comment.