-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement tasks API and adapt notification tests
- Loading branch information
1 parent
d9dcad8
commit 31ed6ba
Showing
6 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Contains possible interaction dealing with Galaxy tasks. | ||
""" | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from bioblend.galaxy.client import Client | ||
|
||
if TYPE_CHECKING: | ||
from uuid import UUID | ||
|
||
from bioblend.galaxy import GalaxyInstance | ||
|
||
|
||
class TasksClient(Client): | ||
""" | ||
This endpoint only works on Galaxy 22.05 or later. | ||
""" | ||
|
||
module = "tasks" | ||
|
||
def __init__(self, galaxy_instance: "GalaxyInstance") -> None: | ||
super().__init__(galaxy_instance) | ||
|
||
def get_task_status(self, task_id: "UUID") -> str: | ||
""" | ||
Determine state of task ID | ||
:type task_id: UUID | ||
:param task_id: the task ID | ||
:rtype: str | ||
:return: String indicating task state | ||
""" | ||
url = self._make_url() + f"/{task_id}/state" | ||
return self._get(url=url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters