summary refs log tree commit diff stats
path: root/svc/db.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-10 05:09:51 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-11 04:54:43 -0400
commit930ef3459659a7b0353cb98c0de01c18d8cb8570 (patch)
treec9ecf6707ec631ede6bc5195c88167079b38fbdf /svc/db.go
parent01956bfa51ff8ccea71843911b4f7c8c21667a67 (diff)
downloadgetwtxt-930ef3459659a7b0353cb98c0de01c18d8cb8570.tar.gz
adding fs sync after db push
Diffstat (limited to 'svc/db.go')
-rw-r--r--svc/db.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/svc/db.go b/svc/db.go
index ce20ed0..3841d83 100644
--- a/svc/db.go
+++ b/svc/db.go
@@ -4,6 +4,7 @@ import (
 	"time"
 
 	"github.com/syndtr/goleveldb/leveldb"
+	"golang.org/x/sys/unix"
 )
 
 type dbase interface {
@@ -49,6 +50,8 @@ func pushDB() error {
 	err := db.push()
 	dbChan <- db
 
+	unix.Sync()
+
 	return err
 }