Skip to content

Commit

Permalink
Raise anonymization timeout to infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Mar 9, 2023
1 parent 97f48d6 commit 6fa7f97
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/hygeia/jobs/anonymization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ defmodule Hygeia.Jobs.Anonymization do
stream = Repo.stream(query, max_rows: 1000)

{:ok, length} =
Repo.transaction(fn ->
anonymizations =
stream
|> Stream.each(anonymization_function)
|> Enum.to_list()

length(anonymizations)
end)
Repo.transaction(
fn ->
anonymizations =
stream
|> Stream.each(anonymization_function)
|> Enum.to_list()

length(anonymizations)
end,
timeout: :infinity
)

{:ok, length}
end
Expand Down

0 comments on commit 6fa7f97

Please sign in to comment.