diff --git a/lib/mix/tasks/upload_to_s3.ex b/lib/mix/tasks/upload_to_s3.ex index 02e20185..0155514f 100644 --- a/lib/mix/tasks/upload_to_s3.ex +++ b/lib/mix/tasks/upload_to_s3.ex @@ -123,7 +123,9 @@ defmodule Mix.Tasks.UploadToS3 do defp upload_typical(queryable, batch_size, file_root, new_file_root, field_name) do Batch.record_batches(queryable, [batch_size: batch_size], fn models -> models - |> Task.async_stream(&upload_typical_model(&1, file_root, new_file_root, field_name)) + |> Task.async_stream(&upload_typical_model(&1, file_root, new_file_root, field_name), + timeout: :infinity + ) |> Stream.run() IO.write("\r#{hd(models).id} (#{DateTime.to_iso8601(hd(models).updated_at)})") @@ -142,7 +144,7 @@ defmodule Mix.Tasks.UploadToS3 do defp upload_images(queryable, batch_size, file_root, new_file_root) do Batch.record_batches(queryable, [batch_size: batch_size], fn models -> models - |> Task.async_stream(&upload_image_model(&1, file_root, new_file_root)) + |> Task.async_stream(&upload_image_model(&1, file_root, new_file_root), timeout: :infinity) |> Stream.run() IO.write("\r#{hd(models).id} (#{DateTime.to_iso8601(hd(models).updated_at)})") diff --git a/lib/philomena/objects.ex b/lib/philomena/objects.ex index 6d05a6d8..2232617f 100644 --- a/lib/philomena/objects.ex +++ b/lib/philomena/objects.ex @@ -72,7 +72,7 @@ defmodule Philomena.Objects do defp run_all(fun) do backends() - |> Task.async_stream(fun) + |> Task.async_stream(fun, timeout: :infinity) |> Stream.run() end