diff --git a/db/event.go b/db/event.go index 736b6947..636c7cd7 100644 --- a/db/event.go +++ b/db/event.go @@ -65,6 +65,10 @@ func (d *document) event(ctx context.Context, met method) (err error) { kind = "DELETE" } + var id = d.i.e.id + d.i.e.id = d.i.e.id + "-bg" + defer func() { d.i.e.id = id }() + vars := data.New() vars.Set(d.id, varKeyThis) vars.Set(kind, varKeyMethod) diff --git a/db/socket.go b/db/socket.go index 4ec96b83..d0e45fc3 100644 --- a/db/socket.go +++ b/db/socket.go @@ -41,6 +41,7 @@ type socket struct { func clear(id string) { go func() { sockets.Range(func(key, val interface{}) bool { + val.(*socket).clear(id + "-bg") val.(*socket).clear(id) return true }) @@ -50,6 +51,7 @@ func clear(id string) { func flush(id string) { go func() { sockets.Range(func(key, val interface{}) bool { + val.(*socket).flush(id + "-bg") val.(*socket).flush(id) return true })