-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis config fixes #19
Conversation
No longer use a default value, since this makes it harder to spot if the configuration is actually broken.
fe9a088
to
2405c87
Compare
- Pass redis connection info to goose client (producer) and worker (consumer) - Ensure that worker is shut down correctly
c21b84a
to
fc75410
Compare
:body (json/write-str (assoc-in {} [:gateway :endpoints :google.com :responseCode] 200))})] | ||
(response-match {:status 200 :body {:valid true}} | ||
{:uri "/endpoints/google.com/config" :request-method :post}))) | ||
(is (= {:status 200 :body {:valid true}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nl.jomco.http-status-codes/ok
{:uri "/endpoints/google.com/config" :request-method :post}))) | ||
(is (= {:status 200 :body {:valid true}} | ||
(result "google.com" | ||
{:status 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
(response-match {:status 200 | ||
:body {:valid false :message "Endpoint validation failed with status: 500"}} | ||
{:uri "/endpoints/google.com/config" :request-method :post}))) | ||
(is (= {:status 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
(with-redefs [http/request (fn [_] {:status 500 :body {:message "mocked response"}})] | ||
(response-match {:status 500 :body {}} | ||
{:uri "/endpoints/google.com/config" :request-method :post}))) | ||
(is (= {:status 500 :body {}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem. etc.
@@ -35,4 +35,4 @@ | |||
(catch Throwable e | |||
(log/error e "Internal error in validator-service") | |||
{:status http-status/internal-server-error | |||
:body {}}))) | |||
:body {:error (ex-message e)}}))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik weet niet of dit een goed idee is. Gaat buitenstaanders niets aan wat er precies mis ging.
@@ -98,9 +99,34 @@ | |||
(wrap-json-response) | |||
(wrap-defaults api-defaults)))) | |||
|
|||
(defn error-message-from-response | |||
[{:keys [status body]}] | |||
(if (<= 400 status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(when (or (http-status-codes/client-error-status? status)
(http-status-codes/server-error-status? status))
[handler] | ||
(fn [request] | ||
(try (let [{:keys [status body] :as response} (handler request)] | ||
(if (<= 500 status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(http-status-codes/server-error-status? status)
@@ -101,7 +101,7 @@ | |||
|
|||
(defn error-message-from-response | |||
[{:keys [status body]}] | |||
(if (<= 400 status) | |||
(when (<= 400 status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(when (or (http-status-codes/client-error-status? status)
(http-status-codes/server-error-status? status))
@@ -0,0 +1,37 @@ | |||
(ns taoensso.encore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik begrijp niet wat dit is en waarvoor het is.
0d900e8
to
c7b54f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -23,6 +24,7 @@ | |||
(is (= http-status/ok status)) | |||
body)) | |||
|
|||
;; TODO: Explain what this does and why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a thread-safe mock implementation of a job queue. It will atomically return the top item on the queue and remove that item from the queue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heb de TODO toegelicht. Ziet er verder goed uit.
c7cea4d
to
5b8b782
Compare
- Adds start! and stop! functions for whole system - Set application log level to DEBUG when REPL is started - Fix jetty lifecycle handling when app is restarted in repl
5b8b782
to
85e0c80
Compare
No description provided.