# HG changeset patch # User Mahlon E. Smith # Date 1569452811 25200 # Node ID e18bc502102826336c70a8afa97b0305d0f641be # Parent 29848143f305d2d2b6c2d5e131ddeed8485dec08 Support forking handlers using this metastore. diff -r 29848143f305 -r e18bc5021028 lib/thingfish/metastore/pggraph.rb --- a/lib/thingfish/metastore/pggraph.rb Sun Sep 01 15:38:16 2019 -0700 +++ b/lib/thingfish/metastore/pggraph.rb Wed Sep 25 16:06:51 2019 -0700 @@ -24,7 +24,7 @@ # Package version - VERSION = '0.3.1' + VERSION = '0.4.0' # Version control revision REVISION = %q$Revision: 686fbfe638bd $ @@ -294,5 +294,11 @@ return ds end + + # Register a hook to make the database connection fork-safe. + Strelka.before_fork do + self.db&.disconnect + end + end # class Thingfish::Metastore::PgGraph