From 4bafc22f43eaa40192f09a920296a807b97fb753 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 30 Nov 2014 16:18:10 +0100 Subject: [PATCH] Fixed appengine.go + minor changes --- appengine/appengine.go | 3 +-- graph/gaedatastore/quadstore.go | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/appengine/appengine.go b/appengine/appengine.go index 18508c3..dcd363c 100644 --- a/appengine/appengine.go +++ b/appengine/appengine.go @@ -23,7 +23,6 @@ import ( "github.com/google/cayley/config" "github.com/google/cayley/db" - "github.com/google/cayley/graph" "github.com/google/cayley/http" _ "github.com/google/cayley/graph/gaedatastore" @@ -103,5 +102,5 @@ func init() { if err != nil { glog.Fatal(err) } - http.SetupRoutes(&handle, cfg) + http.SetupRoutes(handle, cfg) } diff --git a/graph/gaedatastore/quadstore.go b/graph/gaedatastore/quadstore.go index f38047a..7984a2c 100644 --- a/graph/gaedatastore/quadstore.go +++ b/graph/gaedatastore/quadstore.go @@ -194,6 +194,9 @@ func (qs *QuadStore) ApplyDeltas(in []graph.Delta) error { toKeep = append(toKeep, d) } } + if len(toKeep) == 0 { + return nil + } err := qs.updateLog(toKeep) if err != nil { glog.Errorf("Updating log failed %v", err) @@ -480,7 +483,7 @@ func (qs *QuadStore) NodeSize() int64 { func (qs *QuadStore) Horizon() int64 { if qs.context == nil { - glog.Warning("Error fetching horizon, context is nil, graph not correctly initialised") + glog.Warning("Warning: HTTP Request context is nil, cannot get horizon from datastore.") return 0 } // Query log for last entry...