Newer
Older
if err == nil {
sandboxDeleted = true
}
log.Error("Failed to delete session with err: ", err.Error())
_ = authSvc.metricStore.SetSessionMetric(met.SesMetTypeLogout, metric)
if sandboxDeleted {
metricSessionActive.Dec()
metricSessionDuration.Observe(time.Since(session.StartTime).Minutes())
}
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.WriteHeader(http.StatusOK)
}
Kevin Di Lallo
committed
Kevin Di Lallo
committed
func asTriggerWatchdog(w http.ResponseWriter, r *http.Request) {
Kevin Di Lallo
committed
// Refresh session
Kevin Di Lallo
committed
sessionStore := authSvc.sessionMgr.GetSessionStore()
Kevin Di Lallo
committed
if err != nil {
log.Error("Failed to refresh session with err: ", err.Error())
Kevin Di Lallo
committed
return
}
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.WriteHeader(http.StatusOK)
}