Skip to content

Commit

Permalink
chore: configure tasks router with pg queries
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Dec 23, 2024
1 parent 9b69b06 commit 96e9b0e
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ResourceUpdatedResponse,
)
from ...dependencies.developer_id import get_developer_id
from ...models.task.create_or_update_task import (
from ...queries.tasks.create_or_update_task import (
create_or_update_task as create_or_update_task_query,
)
from .router import router
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/create_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ResourceCreatedResponse,
)
from ...dependencies.developer_id import get_developer_id
from ...models.task.create_task import create_task as create_task_query
from ...queries.tasks.create_task import create_task as create_task_query
from .router import router


Expand Down
5 changes: 3 additions & 2 deletions agents-api/agents_api/routers/tasks/create_task_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
from ...common.protocol.developers import Developer
from ...dependencies.developer_id import get_developer_id
from ...env import max_free_executions
from ...models.developer.get_developer import get_developer
from ...queries.developers.get_developer import get_developer
# TODO: Change these once we have pg queries for executions
from ...models.execution.count_executions import (
count_executions as count_executions_query,
)
Expand All @@ -33,7 +34,7 @@
from ...models.execution.update_execution import (
update_execution as update_execution_query,
)
from ...models.task.get_task import get_task as get_task_query
from ...queries.tasks.get_task import get_task as get_task_query
from .router import router

logger: logging.Logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ...autogen.openapi_model import (
Execution,
)
# TODO: Change this once we have pg queries for executions
from ...models.execution.get_execution import (
get_execution as get_execution_query,
)
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/get_task_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Task,
)
from ...dependencies.developer_id import get_developer_id
from ...models.task.get_task import get_task as get_task_query
from ...queries.tasks.get_task import get_task as get_task_query
from .router import router


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ListResponse,
Transition,
)
# TODO: Change this once we have pg queries for executions
from ...models.execution.list_execution_transitions import (
list_execution_transitions as list_execution_transitions_query,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
ListResponse,
)
from ...dependencies.developer_id import get_developer_id
# TODO: Change this once we have pg queries for executions
from ...models.execution.list_executions import (
list_executions as list_task_executions_query,
)
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/list_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Task,
)
from ...dependencies.developer_id import get_developer_id
from ...models.task.list_tasks import list_tasks as list_tasks_query
from ...queries.tasks.list_tasks import list_tasks as list_tasks_query
from .router import router


Expand Down
1 change: 1 addition & 0 deletions agents-api/agents_api/routers/tasks/patch_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
UpdateExecutionRequest,
)
from ...dependencies.developer_id import get_developer_id
# TODO: Change this once we have pg queries for executions
from ...models.execution.update_execution import (
update_execution as update_execution_query,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from ...autogen.openapi_model import TransitionEvent
from ...clients.temporal import get_workflow_handle
from ...dependencies.developer_id import get_developer_id
# TODO: Change this once we have pg queries for executions
from ...models.execution.lookup_temporal_data import lookup_temporal_data
from ...worker.codec import from_payload_data
from .router import router
Expand Down
1 change: 1 addition & 0 deletions agents-api/agents_api/routers/tasks/update_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)
from ...clients.temporal import get_client
from ...dependencies.developer_id import get_developer_id
# TODO: Change this once we have pg queries for executions
from ...models.execution.get_paused_execution_token import (
get_paused_execution_token,
)
Expand Down
Empty file.

0 comments on commit 96e9b0e

Please sign in to comment.