mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
gunicorn fixed, improved manage.py
This commit is contained in:
@@ -9,9 +9,9 @@ from flask_limiter import Limiter
|
||||
from flask_limiter.util import get_remote_address
|
||||
|
||||
# Local Imports
|
||||
from hyperglass import render
|
||||
from hyperglass import configuration
|
||||
import hyperglass.configuration as configuration
|
||||
from hyperglass.command import execute
|
||||
from hyperglass import render
|
||||
|
||||
# Load TOML config file
|
||||
devices = configuration.devices()
|
||||
@@ -27,6 +27,14 @@ rate_limit_query = configuration.gen.rate_limit_query() + " per minute"
|
||||
rate_limit_site = configuration.gen.rate_limit_site() + "per minute"
|
||||
limiter = Limiter(app, key_func=get_remote_address, default_limits=[rate_limit_site])
|
||||
|
||||
|
||||
def renderCSS():
|
||||
try:
|
||||
render.css.renderTemplate()
|
||||
except:
|
||||
raise
|
||||
|
||||
|
||||
# Render Main Flask-Limiter Error Message
|
||||
@app.errorhandler(429)
|
||||
def error429(e):
|
||||
|
Reference in New Issue
Block a user