The Starter stage

When we previously analyzed how the Starter stage worked for the upload pipeline, we saw how we passed a type as an initialization parameter so that the upload Starter stage knew from which QueueWorker process it should fetch new upload requests. For the download Starter stage, the approach is exactly the same: we initialize the Starter process on the download pipeline supervisor with the @starter_name and @direction arguments, which in this case will have the ElixirDrip.Storage.Pipeline.Starter.Download and :download values. This will be enough for the Starter stage to commence producing events on the download pipeline:

iex> alias ElixirDrip.Storage.Pipeline.CommonElixirDrip.Storage.Pipeline.Commoniex> alias ElixirDrip.Storage.Pipeline.Starter ...

Get Mastering Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.