Ash.Resource.Actions.Implementation.Builtins (ash v3.34.4)

Copy Markdown View Source

Builtin generic action implementations

Summary

Functions

Runs the given Reactor as the generic action.

Functions

reactor(reactor, opts \\ [])

@spec reactor(reactor :: module(), opts :: Keyword.t()) ::
  {Ash.Resource.Actions.RunReactor, Keyword.t()}

Runs the given Reactor as the generic action.

The action's arguments are passed as the Reactor's inputs, and the action's context (actor, tenant, etc.) as its context. Every Reactor input needs a corresponding action argument.

Any options are passed to Reactor.run/4. If the action sets transaction? true, the Reactor is run synchronously regardless of the async? option.

Examples

run reactor(MyApp.Reactors.CreatePost)
run reactor(MyApp.Reactors.CreatePost, max_concurrency: 4)