mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Adjust timeouts
This commit is contained in:
parent
ce653a53ba
commit
ba0d231750
2 changed files with 5 additions and 3 deletions
|
@ -123,7 +123,9 @@ defmodule Mix.Tasks.UploadToS3 do
|
||||||
defp upload_typical(queryable, batch_size, file_root, new_file_root, field_name) 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 ->
|
Batch.record_batches(queryable, [batch_size: batch_size], fn models ->
|
||||||
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()
|
|> Stream.run()
|
||||||
|
|
||||||
IO.write("\r#{hd(models).id} (#{DateTime.to_iso8601(hd(models).updated_at)})")
|
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
|
defp upload_images(queryable, batch_size, file_root, new_file_root) do
|
||||||
Batch.record_batches(queryable, [batch_size: batch_size], fn models ->
|
Batch.record_batches(queryable, [batch_size: batch_size], fn models ->
|
||||||
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()
|
|> Stream.run()
|
||||||
|
|
||||||
IO.write("\r#{hd(models).id} (#{DateTime.to_iso8601(hd(models).updated_at)})")
|
IO.write("\r#{hd(models).id} (#{DateTime.to_iso8601(hd(models).updated_at)})")
|
||||||
|
|
|
@ -72,7 +72,7 @@ defmodule Philomena.Objects do
|
||||||
|
|
||||||
defp run_all(fun) do
|
defp run_all(fun) do
|
||||||
backends()
|
backends()
|
||||||
|> Task.async_stream(fun)
|
|> Task.async_stream(fun, timeout: :infinity)
|
||||||
|> Stream.run()
|
|> Stream.run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue