2019-06-07 18:33:49 -07:00
|
|
|
"""
|
|
|
|
https://github.com/checktheroads/hyperglass
|
|
|
|
Guncorn configuration
|
|
|
|
"""
|
|
|
|
|
2019-05-11 23:22:27 -07:00
|
|
|
import multiprocessing
|
|
|
|
|
|
|
|
command = "/usr/local/bin/gunicorn"
|
2019-05-28 14:14:42 -07:00
|
|
|
pythonpath = "/opt/hyperglass"
|
2019-05-11 23:22:27 -07:00
|
|
|
bind = "[::1]:8001"
|
2019-05-28 14:14:42 -07:00
|
|
|
preload = True
|
2019-05-28 00:53:45 -07:00
|
|
|
workers = multiprocessing.cpu_count() * 2
|
2019-05-11 23:22:27 -07:00
|
|
|
user = "www-data"
|
2019-05-11 23:28:13 -07:00
|
|
|
timeout = 60
|
2019-05-28 14:14:42 -07:00
|
|
|
keepalive = 10
|
|
|
|
|
|
|
|
|
|
|
|
def on_starting(server):
|
2019-06-07 18:33:49 -07:00
|
|
|
"""Renders CSS templates at initial code execution with single worker"""
|
2019-05-28 14:14:42 -07:00
|
|
|
import hyperglass
|
|
|
|
|
2019-06-07 18:33:49 -07:00
|
|
|
hyperglass.render.css()
|
2019-05-28 14:14:42 -07:00
|
|
|
print(1)
|