fix exchanges
All checks were successful
Build and Publish / build-release (push) Successful in 1m26s

This commit is contained in:
2026-04-16 17:01:39 -05:00
parent 1f83d7512c
commit 54a8c168bf
2 changed files with 12 additions and 40 deletions

View File

@@ -5,8 +5,8 @@ defmodule WorkloadService.Consumers.QuoteRequestedConsumer do
alias WorkloadService.CommandedApp
alias WorkloadService.Commands.QuoteTask
@exchange "workload_service.events.quote_requested"
@queue "workload_service.quote_requested"
@exchange "policy_service.events.quote_requested"
@queue "policy_service.quote_requested"
@routing_key "quote.requested"
def start_link(opts \\ []) do
@@ -50,12 +50,14 @@ defmodule WorkloadService.Consumers.QuoteRequestedConsumer do
end
end
defp handle_event(%{
"application_id" => application_id,
"org_id" => org_id,
"provider_id" => provider_id,
"policy_type" => policy_type
} = event) do
defp handle_event(
%{
"application_id" => application_id,
"org_id" => org_id,
"provider_id" => provider_id,
"policy_type" => policy_type
} = event
) do
task_id = WorkloadService.Aggregates.TaskId.new(org_id, "quote", Ecto.UUID.generate())
command = %QuoteTask.CreateTask{
@@ -90,4 +92,4 @@ defmodule WorkloadService.Consumers.QuoteRequestedConsumer do
defp amqp_url do
Application.get_env(:workload_service, :amqp_url, "amqp://guest:guest@localhost:5672")
end
end
end