stranck-dev #20
5
app.py
5
app.py
|
@ -16,6 +16,7 @@ import requests
|
||||||
import sys
|
import sys
|
||||||
from sanic.log import logger, logging, access_logger
|
from sanic.log import logger, logging, access_logger
|
||||||
from metrics import *
|
from metrics import *
|
||||||
|
from email_util import killSmptClient
|
||||||
import pretixClient
|
import pretixClient
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
@ -202,6 +203,10 @@ async def logout(request):
|
||||||
|
|
||||||
raise exceptions.Forbidden("You have been logged out.")
|
raise exceptions.Forbidden("You have been logged out.")
|
||||||
|
|
||||||
|
@app.signal("server.shutdown.before")
|
||||||
|
async def sigintHandler(app, loop):
|
||||||
|
killSmptClient()
|
||||||
|
|
||||||
@app.get(METRICS_PATH)
|
@app.get(METRICS_PATH)
|
||||||
async def metrics(request):
|
async def metrics(request):
|
||||||
return text(getMetricsText() + "\n" + getRoomCountersText(request))
|
return text(getMetricsText() + "\n" + getRoomCountersText(request))
|
||||||
|
|
Loading…
Reference in New Issue