Skip to content

Commit 4245914

Browse files
committed
Add info on --keys flag
1 parent 4852c5e commit 4245914

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

index.adoc

+22-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ content:
6565
[,clojure]
6666
----
6767
{:deps {org.clojure/clojure {:mvn/version "1.12.0"}
68-
org.duct-framework/main {:mvn/version "0.1.4"}}
68+
org.duct-framework/main {:mvn/version "0.1.5"}}
6969
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
7070
----
7171

@@ -241,7 +241,7 @@ We'll first add the new dependency:
241241
[,clojure]
242242
----
243243
{:deps {org.clojure/clojure {:mvn/version "1.12.0"}
244-
org.duct-framework/main {:mvn/version "0.1.4"}
244+
org.duct-framework/main {:mvn/version "0.1.5"}
245245
org.duct-framework/module.logging {:mvn/version "0.6.5"}}
246246
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
247247
----
@@ -556,7 +556,7 @@ modules: logging and web.
556556
[,clojure]
557557
----
558558
{:deps {org.clojure/clojure {:mvn/version "1.12.0"}
559-
org.duct-framework/main {:mvn/version "0.1.4"}
559+
org.duct-framework/main {:mvn/version "0.1.5"}
560560
org.duct-framework/module.logging {:mvn/version "0.6.5"}
561561
org.duct-framework/module.web {:mvn/version "0.11.1"}}
562562
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
@@ -797,7 +797,7 @@ Our project dependencies should now look like this:
797797
[,clojure]
798798
----
799799
{:deps {org.clojure/clojure {:mvn/version "1.12.0"}
800-
org.duct-framework/main {:mvn/version "0.1.4"}
800+
org.duct-framework/main {:mvn/version "0.1.5"}
801801
org.duct-framework/module.logging {:mvn/version "0.6.5"}
802802
org.duct-framework/module.web {:mvn/version "0.11.1"}
803803
org.duct-framework/module.sql {:mvn/version "0.7.1"}
@@ -965,3 +965,21 @@ anticipated to be used in. During development a REPL is used and
965965
mistakes are expected, so the migrator will work to sync the migrations
966966
with the database. During production migrations need to be applied with
967967
more care, and so any discrepancies should halt the migration process.
968+
969+
In some production environments, there may be multiple instances of the
970+
application running at any one time. In these cases, you may want to run
971+
the migrations separately. The `--keys` option allows you to limit the
972+
system to a subset of keys. We can use this option to run only the
973+
migrations and logging subsystems.
974+
975+
[,shell]
976+
----
977+
$ duct --main --keys=:duct/migrator:duct/logger
978+
----
979+
980+
This will run any component with a key that derives from
981+
`:duct/migrator` or `:duct/logger`, along with any mandatory dependants.
982+
983+
NOTE: `:duct/logger` is often defined as an optional dependency, via a
984+
*refset*. Without explicitly specifying this as one of the keys, the
985+
migrator will run without logging.

0 commit comments

Comments
 (0)