Tarearbol.DynamicManager.perform

You're seeing just the callback perform, go back to Tarearbol.DynamicManager module for more information.
Link to this callback

perform(id, payload)

View Source (since 0.9.0)

Specs

perform(id :: id(), payload :: payload()) :: response()

The main function, doing all the internal job, supervised.

It will be called with the child id as first argument and the payload option to child spec as second argument (defaulting to nil, can also be ignored if not needed).

Return values

perform/2 might return

  • :halt if it wants to be killed
  • {:ok, result} to store the last result and reschedule with default timeout
  • {:replace, payload} to replace the payload (state) of the current worker with the new one
  • {:replace, id, payload} to replace the current worker with the new one
  • {{:timeout, timeout}, result} to store the last result and reschedule in given timeout interval
  • or deprecated anything else will be treated as a result