Ash FrameworkAF
Ash Framework3y ago
14 replies
moxley

Notifications warning in migration

I'm getting a warning [warning] Missed 1 notifications in action GF.WebComponents.WebSite.update in the logs when running a new migration that calls an :update action on a resource. I know very little about Ash notifications and how they work. I don't want to disable them globally, because they might be useful in the future. How can I prevent this warning from appearing when the migration runs?

12:39:17.050 [warning] Missed 1 notifications in action GF.WebComponents.WebSite.update.

This happens when the resources are in a transaction, and you did not pass
`return_notifications?: true`. If you are in a changeset hook, you can
return the notifications. If not, you can send the notifications using
`Ash.Notifier.notify/1` once your resources are out of a transaction.

    (elixir 1.14.3) lib/process.ex:773: Process.info/2
    (ash 2.13.2) lib/ash/actions/helpers.ex:239: Ash.Actions.Helpers.warn_missed!/3
    (ash 2.13.2) lib/ash/actions/update.ex:176: Ash.Actions.Update.add_notifications/6
    (ash 2.13.2) lib/ash/actions/update.ex:38: Ash.Actions.Update.run/4
    (ash 2.13.2) lib/ash/api/api.ex:2036: Ash.Api.update!/3
    (elixir 1.14.3) lib/enum.ex:975: Enum."-each/2-lists^foreach/1-0-"/2
    (ecto_sql 3.10.1) lib/ecto/migration/runner.ex:289: Ecto.Migration.Runner.perform_operation/3
    (stdlib 4.3) timer.erl:235: :timer.tc/1


While you should likely leave this setting on, you can ignore these or turn them into errors.

To ignore these in all cases:

config :ash, :missed_notifications, :ignore

To turn this into raised errors:

config :ash, :missed_notifications, :raise
Was this page helpful?