Skip to content

Commit

Permalink
Release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnout Roemers committed Nov 7, 2020
1 parent ab8c8ce commit 03bb1a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 1.1.0

### Added

- The function `close!` was added, which closes a State by force by skipping its stop logic.


## 1.0.3

### Added
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ First we need to require the small API of redelay:
Next we use the `state` macro to create two State objects.

```clj
(def config
(def config
(state (println "Loading config...")
(edn/read-string (slurp "config.edn")))

(def db
(def db
(state :start ; <-- optional in this position
(println "Opening datasource...")
(hikari/make-datasource (:jdbc @config))
Expand Down Expand Up @@ -103,6 +103,8 @@ Closing datasource...

So no matter where your state lives, you can reset it and start afresh.

Oh and if a State's stop expression has a bug or can't handle its value, you can always force it to close with `close!`.

### Naming and defstate

Next to the `:start` and `:stop` expressions, you can also pass a `:name` to the `state` macro.
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject functionalbytes/redelay "1.0.3"
(defproject functionalbytes/redelay "1.1.0"
:description "Clojure library for first class lifecycle-managed state."
:url "https://github.com/aroemers/redelay"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
Expand Down

0 comments on commit 03bb1a8

Please sign in to comment.