Skip to content

Commit

Permalink
[ssm] Prevent exceptions from breaking the scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed Mar 29, 2021
1 parent eaa3cc9 commit 588e9e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 0.4.4-SNAPSHOT (unreleased)

### 0.4.3 (2021-03-29)

- Prevent exceptions raised in `populate-from-ssm` from breaking the periodic
scheduler.

### 0.4.2 (2020-08-07)

- `:default` field for an option can now be a nullary function that is invoked
Expand Down
2 changes: 1 addition & 1 deletion build.boot
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(task-options!
pom {:project 'com.grammarly/omniconf
:version "0.4.2"
:version "0.4.3"
:description "Configuration library for Clojure that favors explicitness"
:license {"Apache License, Version 2.0"
"http://www.apache.org/licenses/LICENSE-2.0"}
Expand Down
4 changes: 3 additions & 1 deletion src/omniconf/ssm.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@
(populate-from-ssm path)
(let [poller (or @ssm-poller (reset! ssm-poller (make-scheduled-executor)))]
(.scheduleAtFixedRate ^ScheduledExecutorService poller
#(populate-from-ssm path true)
#(try (populate-from-ssm path true)
;; Prevent exceptions from breaking the scheduler.
(catch Exception _))
interval-in-seconds interval-in-seconds TimeUnit/SECONDS)))

(defn stop-ssm-poller
Expand Down

0 comments on commit 588e9e9

Please sign in to comment.