Use common id / name for background SQL queries

This commit is contained in:
Tobie Morgan Hitchcock 2019-02-06 08:02:22 +00:00
parent 80f532436e
commit 1b4c1bd094

View file

@ -28,7 +28,6 @@ import (
"github.com/abcum/surreal/log"
"github.com/abcum/surreal/sql"
"github.com/abcum/surreal/util/data"
"github.com/abcum/surreal/util/uuid"
_ "github.com/abcum/surreal/kvs/rixxdb"
)
@ -163,7 +162,7 @@ func Process(fib *fibre.Context, ast *sql.Query, vars map[string]interface{}) (o
// to detect unique websocket notifications.
if fib.Get(ctxKeyId) == nil {
fib.Set(ctxKeyId, uuid.New().String())
fib.Set(ctxKeyId, "background")
}
// Get the unique id for this connection