Pass context to event publishing.

To allow tracing propagation via events, we need to pass the context
to the `Publish` function of reva events. This adds the context
everywhere where events are published. If there was no context to pass,
we started a new one with `context.Background()`.
This commit is contained in:
Daniël Franke
2023-08-11 12:01:19 +02:00
parent 6700214519
commit 952ebe7d7d
24 changed files with 86 additions and 61 deletions
@@ -185,7 +185,7 @@ func (g Graph) PatchEducationClass(w http.ResponseWriter, r *http.Request) {
if currentUser, ok := revactx.ContextGetUser(r.Context()); ok {
e.Executant = currentUser.GetId()
}
g.publishEvent(e)
g.publishEvent(r.Context(), e)
}