Tries to not put everything into memory first
This commit is contained in:
@@ -498,11 +498,18 @@
|
||||
(s/buffer 20)
|
||||
(s/realize-each)))
|
||||
)
|
||||
(mu/log ::copying)
|
||||
(s3/put-object :bucket-name (:data-bucket env)
|
||||
:key (str backup-id "/" entity ".ednl")
|
||||
:input-stream (io/make-input-stream (io/file "/tmp/tmp-ednl") {}))
|
||||
(mu/log ::copied)))))))
|
||||
(try
|
||||
(mu/log ::copying)
|
||||
(let [f (io/file "/tmp/tmp-ednl")]
|
||||
(s3/put-object :bucket-name (:data-bucket env)
|
||||
: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 [& _]
|
||||
(try
|
||||
|
||||
Reference in New Issue
Block a user