-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from liquidz/dev
Next release
- Loading branch information
Showing
61 changed files
with
664 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
= Timeouts | ||
|
||
Antq has timeouts for acquiring various information. | ||
These timeouts are customizable by following environmental variables. | ||
|
||
[cols="1,4a,5a"] | ||
|=== | ||
| Name | Default | Description | ||
|
||
| ANTQ_DEFAULT_TIMEOUT | ||
| `10,000` | ||
| Unit is milli sec. | ||
|
||
|
||
| ANTQ_LS_REMOTE_TIMEOUT | ||
| Same as `ANTQ_DEFAULT_TIMEOUT`. | ||
| Timeout for `git ls-remote`. + | ||
Unit is milli sec. | ||
|
||
| ANTQ_GITHUB_API_TIMEOUT | ||
| Same as `ANTQ_DEFAULT_TIMEOUT`. | ||
| Timeout for GitHub API. + | ||
Unit is milli sec. | ||
|
||
| ANTQ_MAVEN_TIMEOUT | ||
| Same as `ANTQ_DEFAULT_TIMEOUT`. | ||
| Timeout for accessing Maven repositories. + | ||
Unit is milli sec. | ||
|
||
| ANTQ_POM_TIMEOUT | ||
| Same as `ANTQ_DEFAULT_TIMEOUT`. | ||
| Timeout for reading POM. + | ||
Unit is milli sec. | ||
|
||
|=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
(ns antq.constant) | ||
(ns antq.constant | ||
(:require | ||
[antq.util.env :as u.env])) | ||
|
||
(def retry-limit 5) | ||
(def retry-limit | ||
"Retry count for | ||
- antq.util.maven/read-pom | ||
- antq.util.git/ls-remote*" | ||
5) | ||
|
||
(def clojure-deps-keys #{:deps :default-deps :extra-deps :override-deps :replace-deps}) | ||
(def clojure-deps-keys | ||
"Keys for detecting dependencies in deps.edn" | ||
#{:deps :default-deps :extra-deps :override-deps :replace-deps}) | ||
|
||
(def default-timeout-msec | ||
(u.env/getlong "ANTQ_DEFAULT_TIMEOUT" 10000)) | ||
|
||
(def ls-remote-timeout-msec | ||
"Timeout msec for | ||
- antq.util.git/ls-remote*" | ||
(u.env/getlong "ANTQ_LS_REMOTE_TIMEOUT" default-timeout-msec)) | ||
|
||
(def github-api-timeout-msec | ||
"Timeout msec for | ||
- antq.ver.github-tag/get-sorted-versions-by-ls-remote*" | ||
(u.env/getlong "ANTQ_GITHUB_API_TIMEOUT" default-timeout-msec)) | ||
|
||
(def maven-timeout-msec | ||
"Timeout msec for | ||
- antq.ver.java/get-versions" | ||
(u.env/getlong "ANTQ_MAVEN_TIMEOUT" default-timeout-msec)) | ||
|
||
(def pom-timeout-msec | ||
"Timeout msec for | ||
- antq.util.maven/read-pom*" | ||
(u.env/getlong "ANTQ_POM_TIMEOUT" default-timeout-msec)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,49 @@ | ||
(ns antq.log) | ||
(ns antq.log | ||
(:require | ||
[clojure.core.async :as async])) | ||
|
||
(defonce logger-ch nil) | ||
|
||
(def ^:dynamic *verbose* false) | ||
|
||
(defn stop-async-logger! | ||
[logger-end-ch] | ||
(when logger-ch | ||
(async/>!! logger-ch ::eol) | ||
(async/<!! logger-end-ch) | ||
(async/close! logger-ch) | ||
(async/close! logger-end-ch) | ||
(alter-var-root #'logger-ch (fn [_] nil)))) | ||
|
||
(defn start-async-logger! | ||
[] | ||
(let [end-ch (async/chan)] | ||
(alter-var-root #'logger-ch (fn [_] (async/chan))) | ||
(async/go-loop [] | ||
(let [v (async/<! logger-ch)] | ||
(when (string? v) | ||
(print v) | ||
(flush)) | ||
(if (= ::eol v) | ||
(async/>! end-ch ::end) | ||
(recur)))) | ||
end-ch)) | ||
|
||
(defn info | ||
[s] | ||
(println s)) | ||
|
||
(defn warning | ||
[s] | ||
(when *verbose* | ||
(binding [*out* *err*] | ||
(println s)))) | ||
|
||
(defn error | ||
[s] | ||
(binding [*out* *err*] | ||
(println s))) | ||
|
||
(defn warning | ||
(defn async-print | ||
[s] | ||
(when *verbose* | ||
(binding [*out* *err*] | ||
(println s)))) | ||
(async/>!! logger-ch s)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.