Skip to content

Commit 996c003

Browse files
committed
Only set workload on EE
1 parent 4e1b30a commit 996c003

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

config/runtime.exs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,13 @@ config :plausible, Plausible.ClickhouseRepo,
641641
max_execution_time: 20
642642
]
643643

644+
ingest_repo_extra_settings =
645+
if config_env() in [:prod, :dev, :test, :load] do
646+
[workload: "ingestion"]
647+
else
648+
[]
649+
end
650+
644651
config :plausible, Plausible.IngestRepo,
645652
queue_target: 500,
646653
queue_interval: 2000,
@@ -649,10 +656,10 @@ config :plausible, Plausible.IngestRepo,
649656
flush_interval_ms: ch_flush_interval_ms,
650657
max_buffer_size: ch_max_buffer_size,
651658
pool_size: ingest_pool_size,
652-
settings: [
653-
materialized_views_ignore_errors: 1,
654-
workload: "ingestion"
655-
],
659+
settings:
660+
[
661+
materialized_views_ignore_errors: 1
662+
] ++ ingest_repo_extra_settings,
656663
table_settings: [
657664
storage_policy: get_var_from_path_or_env(config_dir, "CLICKHOUSE_DEFAULT_STORAGE_POLICY")
658665
]

0 commit comments

Comments
 (0)