Normandy.Behaviours.SessionStore.Postgres
(normandy v2.2.0)
View Source
Durable, cluster-shared SessionStore over Postgres (Ecto). The handle is the
host's Ecto Repo module. Conversation content and opaque turn_state are stored
as Erlang terms (term_to_binary). Entries are a global parent-linked forest, so
fork/3 shares ancestors instead of copying.
Pass it as {Normandy.Behaviours.SessionStore.Postgres, MyApp.Repo} (the handle is
the Repo module itself), for example as Turn.Session.new/1's :store. Its tables
come from four migrations: call the up/0 of
Normandy.Behaviours.SessionStore.Postgres.Migration, MigrationAddTemplate,
MigrationAddResumePolicy and MigrationAddInflight, in that order, from one host
migration, and their down/0 in the reverse order (the distributed sessions guide
has the migration module).