Tries to not put everything into memory first
This commit is contained in:
@@ -498,11 +498,18 @@
|
|||||||
(s/buffer 20)
|
(s/buffer 20)
|
||||||
(s/realize-each)))
|
(s/realize-each)))
|
||||||
)
|
)
|
||||||
(mu/log ::copying)
|
(try
|
||||||
(s3/put-object :bucket-name (:data-bucket env)
|
(mu/log ::copying)
|
||||||
:key (str backup-id "/" entity ".ednl")
|
(let [f (io/file "/tmp/tmp-ednl")]
|
||||||
:input-stream (io/make-input-stream (io/file "/tmp/tmp-ednl") {}))
|
(s3/put-object :bucket-name (:data-bucket env)
|
||||||
(mu/log ::copied)))))))
|
:key (str backup-id "/" entity ".ednl")
|
||||||
|
:input-stream (io/make-input-stream f {})
|
||||||
|
:metadata {:content-length (.length f)}))
|
||||||
|
(mu/log ::copied)
|
||||||
|
(catch Exception e
|
||||||
|
(mu/log ::upload-error
|
||||||
|
:exception e)
|
||||||
|
(throw e)))))))))
|
||||||
|
|
||||||
(defn -main [& _]
|
(defn -main [& _]
|
||||||
(try
|
(try
|
||||||
|
|||||||
Reference in New Issue
Block a user