Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.

### Fixed
- Fixed weekly/monthly e-mail report [rendering issues](https://github.com/plausible/analytics/issues/284)
- Fixed [IPv6 problems](https://github.com/plausible/analytics/issues/3173) in data migration plausible/analytics#3179
- Fixed [long URLs display](https://github.com/plausible/analytics/issues/3158) in Outbound Link breakdown view
- Fixed [Sentry reports](https://github.com/plausible/analytics/discussions/3166) for ingestion requests plausible/analytics#3182

Expand Down
7 changes: 5 additions & 2 deletions lib/plausible/data_migration/repo.ex
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
defmodule Plausible.DataMigration.Repo do
@moduledoc """
Ecto.Repo for Clickhouse data migrations, to be started manually,
Ecto.Repo for Clickhouse data migrations, to be started manually,
outside of the main application supervision tree.
"""
use Ecto.Repo,
otp_app: :plausible,
adapter: Ecto.Adapters.ClickHouse

def start(url, max_threads) when is_binary(url) and is_integer(max_threads) do
default_config = Plausible.IngestRepo.config()

@ruslandoga ruslandoga Jul 24, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using IngestRepo to be consistent with

Application.get_env(:plausible, Plausible.IngestRepo)[:url]


start_link(
url: url,
queue_target: 500,
Expand All @@ -16,7 +18,8 @@ defmodule Plausible.DataMigration.Repo do
settings: [
max_insert_threads: max_threads,
send_progress_in_http_headers: 1
]
],
transport_opts: Keyword.fetch!(default_config, :transport_opts)
)
end
end