Guest User

Untitled

a guest
Mar 24th, 2019
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. defmodule KinesisWriter do
  2. use Application
  3.  
  4. def start(_type, _args) do
  5. children = [
  6. :poolboy.child_spec(
  7. :kinesis_writer_pool,
  8. [
  9. name: {:local, :kinesis_writer_pool},
  10. worker_module: KinesisWriter.Worker,
  11. size: 3,
  12. max_overflow: 5,
  13. strategy: :fifo
  14. ],
  15. []
  16. ),
  17. ...other children...
  18. ]
  19.  
  20. opts = [strategy: :one_for_one, name: KinesisWriter.Supervisor]
  21. Supervisor.start_link(children, opts)
  22. end
  23. end
RAW Paste Data