From 3c47a11bd96c69f22d13f406c0e4bcf6a0509bb6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 25 Apr 2009 07:48:30 +0000 Subject: [PATCH] * Don't disable fsync in production. --- src/lib/Hydra/Helper/Nix.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index 562b2915..a27f9711 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -73,7 +73,8 @@ sub getHydraDBPath { sub openHydraDB { my $db = Hydra::Schema->connect(getHydraDBPath, "", "", {}); - $db->storage->dbh->do("PRAGMA synchronous = OFF;"); + $db->storage->dbh->do("PRAGMA synchronous = OFF;") + if defined $ENV{'HYDRA_NO_FSYNC'}; return $db; }