-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make aws client selectable #16
Conversation
c7cc3cd
to
fd52ff5
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.
Can you update License
section in README.md?
CHANGELOG.md
Outdated
@@ -1,6 +1,33 @@ | |||
# Change Log | |||
|
|||
## [Unreleased] | |||
### Breaking Changes | |||
* Add required "client" arguments to start-consumer |
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.
Since the 'client' argument already exists, please update the comment to 'Make the client argument mandatory'.
(aws/client {:api :sqs})) | ||
given-client? (some? (:client opts)) | ||
num-workers (or (:num-workers opts) | ||
^Consumer [queue-url consume client & [opts]] |
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.
Is it possible to add an assertion for the client here?
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.
Other type checks are done within gluttony.record.consumer/new-consumer
, but should I do client here?
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.
I didn't notice that. No action is needed then.
cf57eca
to
2a3109c
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.
@egs33 Great work! Overall the PR looks good.
To deploy clojars, license information is required in build.edn now, so please add it.
test/gluttony/core_test.clj
Outdated
|
||
(testing "Gather every data in order" | ||
;; Add test data | ||
(let [uuid (UUID/randomUUID)] |
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.
NIT you can use clojure.core/random-uuid
test/gluttony/core_test.clj
Outdated
consume (fn [^Message message respond _] | ||
(log/infof "start to consume:%s" (.body message)) | ||
(a/go | ||
;(is (instance? gluttony.record.message.SQSMessage message)) |
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.
Extra comment?
@@ -0,0 +1,83 @@ | |||
(ns gluttony.record.aws-sqs-client | |||
(:require | |||
[clojure.core.async :as as] |
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.
NIT In another namespace, clojure.core.async
is aliased as a
.
We should use same alias name in a project.
test/gluttony/core_test.clj
Outdated
consume (fn [message respond _] | ||
(log/infof "start to consume:%s" (:body message)) | ||
(a/go | ||
;(is (instance? gluttony.record.message.SQSMessage message)) |
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.
Extra comment?
build.edn
Outdated
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.
Could you add :licenses
?
https://github.com/liquidz/build.edn/blob/main/doc/format/licenses.adoc
Now clojars requires that pom.xml contains license information.
clojars/clojars-web#874
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.
@egs33 Thanks for your fixing! LGTM!
Thank you for reviewing! |
Until now, this library has used aws-api.
This PR make available to use other client libraries using protocol.
This version makes it possible to use the AWS SDK.