Operator CLI for moving a game's state between MoM and the GM's own store (mom/docs/phase-2/02-state-migration.md). Run from the repo root with the GM's usual environment: GAME_NAME, MOM_URL, the MOM_* credentials, and GM_PG_URL/USER/PASSWORD (GM_PG_SCHEMA to aim at a scratch schema for a dry run).
lein run -m <game>.migrate fetch FILE save MoM's export (read-only) lein run -m <game>.migrate diff FILE compare a saved export with the store (read-only; exit 1 if they differ) lein run -m <game>.migrate import FILE --confirm import into the EMPTY store and verify lein run -m <game>.migrate rollback-write --confirm write the store's state back into MoM
import and rollback-write write, so each refuses unless MoM reports the game frozen
with no events in flight (POST /admin/games/:g/freeze, then wait for in-flight 0), and
unless --confirm is given. import also refuses a store that already has state. Never boot
the GM with GM_RUNTIME=v2 against a schema before importing into it: it seeds an empty
store from the game spec, and the import would then be refused.
Operator CLI for moving a game's state between MoM and the GM's own store
(mom/docs/phase-2/02-state-migration.md). Run from the repo root with the GM's usual
environment: GAME_NAME, MOM_URL, the MOM_* credentials, and GM_PG_URL/USER/PASSWORD
(GM_PG_SCHEMA to aim at a scratch schema for a dry run).
lein run -m <game>.migrate fetch FILE save MoM's export (read-only)
lein run -m <game>.migrate diff FILE compare a saved export with the store
(read-only; exit 1 if they differ)
lein run -m <game>.migrate import FILE --confirm import into the EMPTY store and verify
lein run -m <game>.migrate rollback-write --confirm
write the store's state back into MoM
`import` and `rollback-write` write, so each refuses unless MoM reports the game frozen
with no events in flight (POST /admin/games/:g/freeze, then wait for in-flight 0), and
unless --confirm is given. `import` also refuses a store that already has state. Never boot
the GM with GM_RUNTIME=v2 against a schema before importing into it: it seeds an empty
store from the game spec, and the import would then be refused.(-main & args)(run args {:keys [env store]})Runs one command. opts: {:env map :store store} (the store is built from the
environment when not given). Returns {:exit n :out s :err s}; never exits the JVM.
Runs one command. `opts`: {:env map :store store} (the store is built from the
environment when not given). Returns {:exit n :out s :err s}; never exits the JVM.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |