Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
#5 review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
prayerslayer committed Aug 28, 2015
1 parent 97ace42 commit 81cd667
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/org/zalando/stups/mint/worker/job/run.clj
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
(throw e))
(storage/update-status storage-url (:id app)
{:has_problems true
:s3_errors (if (= "S3Exception" (:type (ex-data e)))
(inc (:s3_errors app)))
:s3_errors (when (= "S3Exception" (:type (ex-data e)))
(inc (:s3_errors app)))
:message (str e)}
tokens)
(log/warn "Could not synchronize app %s because %s." (:id app) (str e))))))))
Expand Down
7 changes: 2 additions & 5 deletions src/org/zalando/stups/mint/worker/job/sync_app.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
(log/debug "Start syncing app %s..." app-id)
(if-not (> s3-errors
max-errors)
(let [bucket-writability (map #(list app-id (s3/writable? % app-id))
(:s3_buckets app))
unwritable (map first
(remove second
bucket-writability))]
(let [unwritable (doall (filter #(not (s3/writable? %))
(:s3_buckets app)))]
(if (seq unwritable)
(do
(log/debug "Skipping sync for app %s because there are unwritable S3 buckets: %s" unwritable)
Expand Down

0 comments on commit 81cd667

Please sign in to comment.