update pool size and concurrency default value for facts runner
All checks were successful
ci / docker (push) Successful in 4m19s
All checks were successful
ci / docker (push) Successful in 4m19s
This commit is contained in:
parent
4e9d98afe2
commit
0987290dca
@ -21,7 +21,7 @@ defmodule LolAnalytics.Facts.FactsRunner do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def peach(enum, fun, concurrency \\ 20, timeout \\ :infinity) do
|
def peach(enum, fun, concurrency \\ System.schedulers_online() * 2, timeout \\ :infinity) do
|
||||||
Task.async_stream(enum, &fun.(&1), max_concurrency: concurrency, timeout: timeout)
|
Task.async_stream(enum, &fun.(&1), max_concurrency: concurrency, timeout: timeout)
|
||||||
|> Stream.each(fn {:ok, val} -> val end)
|
|> Stream.each(fn {:ok, val} -> val end)
|
||||||
|> Enum.to_list()
|
|> Enum.to_list()
|
||||||
|
@ -11,7 +11,7 @@ config :lol_analytics, LoLAnalytics.Repo,
|
|||||||
hostname: "localhost",
|
hostname: "localhost",
|
||||||
database: "lol_analytics_test#{System.get_env("MIX_TEST_PARTITION")}",
|
database: "lol_analytics_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox,
|
pool: Ecto.Adapters.SQL.Sandbox,
|
||||||
pool_size: System.schedulers_online() * 2
|
pool_size: System.schedulers_online() * 4
|
||||||
|
|
||||||
# We don't run a server during test. If one is required,
|
# We don't run a server during test. If one is required,
|
||||||
# you can enable the server option below.
|
# you can enable the server option below.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user