From 6071fe85412a28797d114baee4aa9841dd4dcbc3 Mon Sep 17 00:00:00 2001 From: Tarun Date: Thu, 30 Nov 2023 16:39:29 +0530 Subject: [PATCH] Add util functions to read configs --- swift-ticketing/src/swift_ticketing/config.clj | 3 +++ swift-ticketing/src/swift_ticketing/core.clj | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/swift-ticketing/src/swift_ticketing/config.clj b/swift-ticketing/src/swift_ticketing/config.clj index 7c165d7..8ed3581 100644 --- a/swift-ticketing/src/swift_ticketing/config.clj +++ b/swift-ticketing/src/swift_ticketing/config.clj @@ -6,3 +6,6 @@ (-> cfg-path (io/resource) (aero/read-config))) + +(defn read-app-config [] (read-config "config.edn")) +(defn read-test-config [] (read-config "config.test.edn")) diff --git a/swift-ticketing/src/swift_ticketing/core.clj b/swift-ticketing/src/swift_ticketing/core.clj index 9d144f3..1780d37 100644 --- a/swift-ticketing/src/swift_ticketing/core.clj +++ b/swift-ticketing/src/swift_ticketing/core.clj @@ -23,7 +23,7 @@ (defn -main [& args] - (let [config (config/read-config "config.edn") + (let [config (config/read-app-config) redis-config {:pool redis-conn-pool :spec (:redis config)} locking-strategy (:locking-strategy config)]