refactor
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 4s

This commit is contained in:
2026-06-29 12:34:58 +02:00
parent d711348863
commit 46be260fcc
35 changed files with 1765 additions and 198 deletions
+4 -1
View File
@@ -26,7 +26,7 @@ type Publisher interface {
// still registered (so the editor lists it) but errors at run time — and since
// hook errors never abort a flow, that failure is logged, not fatal.
func RegisterEmitHook(reg *flow.Registry, pub Publisher) {
reg.Hook("amqp_emit", func(_ context.Context, st *flow.State, info flow.HookInfo, params json.RawMessage) error {
reg.HookWithMeta("amqp_emit", func(_ context.Context, st *flow.State, info flow.HookInfo, params json.RawMessage) error {
if pub == nil {
return fmt.Errorf("amqp_emit: no publisher configured")
}
@@ -54,5 +54,8 @@ func RegisterEmitHook(reg *flow.Registry, pub Publisher) {
"vars": st.Vars,
})
return pub.Publish(p.Exchange, p.RoutingKey, body)
}, flow.CapabilityMeta{
Description: "Publish the flow event payload to RabbitMQ.",
ExampleParams: json.RawMessage(`{"exchange":"order","routingKey":"order-events"}`),
})
}