Skip to content

Commit

Permalink
Improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Mar 19, 2024
1 parent 75b59e1 commit 51e25b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions posthog/clickhouse/client/execute_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ def delete_query_status(self):


def execute_process_query(
team_id: int, user_id: int, query_id: str, query_json: str, limit_context: LimitContext, refresh_requested: bool
team_id: int,
user_id: int,
query_id: str,
query_json: dict,
limit_context: Optional[LimitContext],
refresh_requested: bool,
):
manager = QueryStatusManager(query_id, team_id)

Expand Down Expand Up @@ -112,7 +117,7 @@ def execute_process_query(
def enqueue_process_query_task(
team_id: int,
user_id: int,
query_json: str,
query_json: dict,
query_id: Optional[str] = None,
refresh_requested: bool = False,
force: bool = False,
Expand Down
7 changes: 4 additions & 3 deletions posthog/tasks/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
from typing import Any, Optional
from typing import Optional
from uuid import UUID

from celery import shared_task
Expand All @@ -9,6 +9,7 @@
from prometheus_client import Gauge

from posthog.cloud_utils import is_cloud
from posthog.hogql.constants import LimitContext
from posthog.metrics import pushed_metrics_registry
from posthog.ph_client import get_ph_client
from posthog.redis import get_client
Expand Down Expand Up @@ -36,8 +37,8 @@ def process_query_task(
team_id: str,
user_id: str,
query_id: str,
query_json: Any,
limit_context: Any = None,
query_json: dict,
limit_context: Optional[LimitContext] = None,
refresh_requested: bool = False,
) -> None:
"""
Expand Down

0 comments on commit 51e25b8

Please sign in to comment.