Skip to content

Commit

Permalink
perf: Force online for process_query_task (#22908)
Browse files Browse the repository at this point in the history
  • Loading branch information
timgl authored Jun 12, 2024
1 parent cedcf6c commit 50b1cca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions posthog/clickhouse/client/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ def sync_execute(
get_query_tag_value("access_method") == "personal_api_key"
or
# Execute all celery tasks not directly set to be online on the offline cluster
(
get_query_tag_value("kind") == "celery"
and get_query_tag_value("id") != "posthog.tasks.tasks.process_query_task"
)
get_query_tag_value("kind") == "celery"
):
workload = Workload.OFFLINE

# Make sure we always have process_query_task on the online cluster
if get_query_tag_value("id") == "posthog.tasks.tasks.process_query_task":
workload = Workload.ONLINE

with get_pool(workload, team_id, readonly).get_client() as client:
start_time = perf_counter()

Expand Down

0 comments on commit 50b1cca

Please sign in to comment.