mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 21:43:02 +12:00
fix: default custom steps to be async?: false
This commit is contained in:
parent
4fde1b9d93
commit
49929de5a1
2 changed files with 2 additions and 11 deletions
|
@ -261,16 +261,7 @@ defmodule Ash.DataLayer.Mnesia do
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def transaction(resource, func, _timeout) do
|
def transaction(_, func, _timeout) do
|
||||||
func = fn ->
|
|
||||||
try do
|
|
||||||
func.()
|
|
||||||
rescue
|
|
||||||
exception ->
|
|
||||||
rollback(resource, Ash.Error.to_ash_error(exception, __STACKTRACE__))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
case Mnesia.transaction(func) do
|
case Mnesia.transaction(func) do
|
||||||
{:atomic, result} -> {:ok, result}
|
{:atomic, result} -> {:ok, result}
|
||||||
{:aborted, reason} -> {:error, reason}
|
{:aborted, reason} -> {:error, reason}
|
||||||
|
|
|
@ -13,7 +13,7 @@ defmodule Ash.Flow.Step.Custom do
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
doc:
|
doc:
|
||||||
"Whether or not this step can be run outside of the current process. Defaults to true.",
|
"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")
|
|> Ash.OptionsHelpers.merge_schemas(@shared_opts, "Global Options")
|
||||||
|
|
Loading…
Reference in a new issue