populator v0.5.0 Populator.Receiver

Summary

Functions

Start a receive block to listen to :populate message. Any :populate message will trigger a run of Populator.run/3. Example

Functions

run(args)

Start a receive block to listen to :populate message. Any :populate message will trigger a run of Populator.run/3. Example:

  Task.async fn->
    Populator.Receiver.run(name: :my_receiver, run_args: run_args)
  end

  send :my_receiver, :populate

To be added to a supervisor hierarchy wrapped in a Task, like this:

  worker(Task, [Populator.Receiver,:run,[args]])
  • run_args are the arguments expected by Populator.run/3
  • name is the name to be registered with (not given means not registered)