Skip to content

Commit

Permalink
add transport_opts to data migration (#3179)
Browse files Browse the repository at this point in the history
* add transport_opts to data migration

* add changelog entry

---------

Co-authored-by: hq1 <[email protected]>
  • Loading branch information
ruslandoga and aerosol authored Jul 25, 2023
1 parent d89dc46 commit 1c17e89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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()

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

0 comments on commit 1c17e89

Please sign in to comment.