Upload binary via scp

This commit is contained in:
alesapin 2021-04-14 19:25:48 +03:00
parent c506e3218b
commit e9e9a7d7d5
2 changed files with 6 additions and 1 deletions

View File

@ -19,12 +19,17 @@
[url] [url]
(non-precise-cached-wget! url)) (non-precise-cached-wget! url))
(defn get-clickhouse-scp
[path]
(c/upload path (str common-prefix "/clickhouse")))
(defn download-clickhouse (defn download-clickhouse
[source] [source]
(info "Downloading clickhouse from" source) (info "Downloading clickhouse from" source)
(cond (cond
(clojure.string/starts-with? source "rbtorrent:") (get-clickhouse-sky source) (clojure.string/starts-with? source "rbtorrent:") (get-clickhouse-sky source)
(clojure.string/starts-with? source "http") (get-clickhouse-url source) (clojure.string/starts-with? source "http") (get-clickhouse-url source)
(.exists (io/file source)) (get-clickhouse-scp source)
:else (throw (Exception. (str "Don't know how to download clickhouse from" source))))) :else (throw (Exception. (str "Don't know how to download clickhouse from" source)))))
(defn unpack-deb (defn unpack-deb

View File

@ -72,7 +72,7 @@ ZooKeeperRequestPtr CreateRequestGenerator::generate()
plength = *path_length; plength = *path_length;
auto path_candidate = generateRandomPath(path_prefix, plength); auto path_candidate = generateRandomPath(path_prefix, plength);
while(paths_created.count(path_candidate)) while (paths_created.count(path_candidate))
path_candidate = generateRandomPath(path_prefix, plength); path_candidate = generateRandomPath(path_prefix, plength);
paths_created.insert(path_candidate); paths_created.insert(path_candidate);