Fixed appengine.go + minor changes

This commit is contained in:
= 2014-11-30 16:18:10 +01:00 committed by panamafrancis
parent fbb3fc87ba
commit 4bafc22f43
2 changed files with 5 additions and 3 deletions

View file

@ -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)
}

View file

@ -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...