fix: default custom steps to be async?: false

This commit is contained in:
Zach Daniel 2022-04-19 12:03:47 -04:00
parent 4fde1b9d93
commit 49929de5a1
2 changed files with 2 additions and 11 deletions

View file

@ -261,16 +261,7 @@ defmodule Ash.DataLayer.Mnesia do
end
@impl true
def transaction(resource, func, _timeout) do
func = fn ->
try do
func.()
rescue
exception ->
rollback(resource, Ash.Error.to_ash_error(exception, __STACKTRACE__))
end
end
def transaction(_, func, _timeout) do
case Mnesia.transaction(func) do
{:atomic, result} -> {:ok, result}
{:aborted, reason} -> {:error, reason}

View file

@ -13,7 +13,7 @@ defmodule Ash.Flow.Step.Custom do
type: :boolean,
doc:
"Whether or not this step can be run outside of the current process. Defaults to true.",
default: true
default: false
]
]
|> Ash.OptionsHelpers.merge_schemas(@shared_opts, "Global Options")