From 35c324b33bbaa0ddba355ff31e176a9a51b93d32 Mon Sep 17 00:00:00 2001 From: Timo Huber Date: Mon, 2 Dec 2024 14:03:37 +0100 Subject: [PATCH] pass queue id (#465) * pass queue id * fix production condition of text message dlr --- pool/app/text_message/text_message_service.ml | 4 ++-- pool/pool_queue/pool_queue.ml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pool/app/text_message/text_message_service.ml b/pool/app/text_message/text_message_service.ml index 2db257408..901a081a1 100644 --- a/pool/app/text_message/text_message_service.ml +++ b/pool/app/text_message/text_message_service.ml @@ -234,13 +234,13 @@ module Job = struct let open Cohttp in let dlr = if is_production () - then None - else + then let open CCOption in id >|= CCPair.make tenant_url |> get_exn_or "Text message service: No instance id provided" |> return + else None in let%lwt resp, body_string = send_message ?dlr api_key message in (match diff --git a/pool/pool_queue/pool_queue.ml b/pool/pool_queue/pool_queue.ml index 56ce0ce28..78fcfff6f 100644 --- a/pool/pool_queue/pool_queue.ml +++ b/pool/pool_queue/pool_queue.ml @@ -167,7 +167,7 @@ let run_job in let%lwt result = Lwt.catch - (fun () -> handle database_label input) + (fun () -> handle ~id database_label input) (log_reraise "Exception caught while running job, this is a bug in your job \ handler. Don't throw exceptions there, use CCResult.t instead.")