Adjust timeouts

This commit is contained in:
byte[] 2022-05-15 09:44:17 -04:00
parent ce653a53ba
commit ba0d231750
2 changed files with 5 additions and 3 deletions

View file

@ -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)})")

View file

@ -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