Ash FrameworkAF
Ash Framework3y ago
46 replies
Blibs

pub_sub event not being broadcasted

I have this action in my resource:

    update :update_images do
      accept [:status, :images]
    end


And here is my pub_sub section:

  pub_sub do
    module MarketplaceWeb.Endpoint

    prefix "property"

    publish :update, [:id], event: "property_updated"
    publish :update_images, [:id], event: "property_updated"
  end


I would expect that if I call MyResource.update_images it would broadcast the event, but this doesn't seem to be the case.

If I add this MarketplaceWeb.Endpoint.subscribe("property:#{property_id}") to a process I will not receive the "property_updated" event.

Before I was using the default update action and was receiving the event normally.
Was this page helpful?