web: remove dead code
This commit is contained in:
parent
c67368bcf7
commit
b0eeca24d5
1 changed files with 0 additions and 27 deletions
|
@ -93,19 +93,6 @@ def create_app():
|
|||
if app.debug:
|
||||
app.wsgi_app = sqltap.wsgi.SQLTapMiddleware(app.wsgi_app)
|
||||
|
||||
# Setup prometheus metrics
|
||||
if app.config.get("PROMETHEUS_DIR"):
|
||||
# This needs to be set before importing prometheus_client
|
||||
os.environ["prometheus_multiproc_dir"] = app.config["PROMETHEUS_DIR"]
|
||||
|
||||
# FIXME: we could expose this somehow
|
||||
from prometheus_flask_exporter.multiprocess import UWsgiPrometheusMetrics
|
||||
|
||||
metrics = UWsgiPrometheusMetrics(group_by="url_rule")
|
||||
|
||||
metrics.init_app(app)
|
||||
# metrics.register_endpoint('/varz', app)
|
||||
|
||||
# Register blueprints
|
||||
import webapp.views
|
||||
import webapp.admin
|
||||
|
@ -114,20 +101,6 @@ def create_app():
|
|||
app.register_blueprint(webapp.admin.bp)
|
||||
app.register_blueprint(webapp.api.bp)
|
||||
|
||||
# Custom filters
|
||||
@app.template_filter("inflect")
|
||||
def inflect(v, one, two, five):
|
||||
num = abs(v)
|
||||
|
||||
if num == 0:
|
||||
return "%d %s" % (v, five)
|
||||
elif num == 1:
|
||||
return "%d %s" % (v, one)
|
||||
elif num <= 4:
|
||||
return "%d %s" % (v, two)
|
||||
|
||||
return "%d %s" % (v, five)
|
||||
|
||||
# Custom CLI commands
|
||||
import webapp.commands
|
||||
|
||||
|
|
Loading…
Reference in a new issue