def on_delete_session(payload, s): req = s["request"] #print payload #print req.getConnectionId() p={} p["id"] = req.getConnectionId() if p["id"] != 0: p["lastActivity"] = s["lastActivity"] p["reason"] = payload["reason"] annotations.endSession(p) else: pass