Skip to content

Commit

Permalink
chore: add executions pg queries in tasks router
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Dec 23, 2024
1 parent d3e8831 commit 9853846
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
11 changes: 5 additions & 6 deletions agents-api/agents_api/routers/tasks/create_task_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
from ...dependencies.developer_id import get_developer_id
from ...env import max_free_executions

# TODO: Change these once we have pg queries for executions
from ...models.execution.count_executions import (
from ...queries.executions.count_executions import (
count_executions as count_executions_query,
)
from ...models.execution.create_execution import (
from ...queries.executions.create_execution import (
create_execution as create_execution_query,
)
from ...models.execution.create_temporal_lookup import create_temporal_lookup
from ...models.execution.prepare_execution_input import prepare_execution_input
from ...models.execution.update_execution import (
from ...queries.executions.create_temporal_lookup import create_temporal_lookup
from ...queries.executions.prepare_execution_input import prepare_execution_input
from ...queries.executions.update_execution import (
update_execution as update_execution_query,
)
from ...queries.developers.get_developer import get_developer
Expand Down
3 changes: 1 addition & 2 deletions agents-api/agents_api/routers/tasks/get_execution_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
Execution,
)

# TODO: Change this once we have pg queries for executions
from ...models.execution.get_execution import (
from ...queries.executions.get_execution import (
get_execution as get_execution_query,
)
from .router import router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Transition,
)

# TODO: Change this once we have pg queries for executions
from ...models.execution.list_execution_transitions import (
from ...queries.executions.list_execution_transitions import (
list_execution_transitions as list_execution_transitions_query,
)
from .router import router
Expand Down
3 changes: 1 addition & 2 deletions agents-api/agents_api/routers/tasks/list_task_executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
)
from ...dependencies.developer_id import get_developer_id

# TODO: Change this once we have pg queries for executions
from ...models.execution.list_executions import (
from ...queries.executions.list_executions import (
list_executions as list_task_executions_query,
)
from .router import router
Expand Down
3 changes: 1 addition & 2 deletions agents-api/agents_api/routers/tasks/patch_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
)
from ...dependencies.developer_id import get_developer_id

# TODO: Change this once we have pg queries for executions
from ...models.execution.update_execution import (
from ...queries.executions.update_execution import (
update_execution as update_execution_query,
)
from .router import router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
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 ...queries.executions.lookup_temporal_data import lookup_temporal_data
from ...worker.codec import from_payload_data
from .router import router

Expand Down
5 changes: 2 additions & 3 deletions agents-api/agents_api/routers/tasks/update_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
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 (
from ...queries.executions.get_paused_execution_token import (
get_paused_execution_token,
)
from ...models.execution.get_temporal_workflow_data import (
from ...queries.executions.get_temporal_workflow_data import (
get_temporal_workflow_data,
)
from .router import router
Expand Down

0 comments on commit 9853846

Please sign in to comment.