mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Refactor of caching & data storage part 16 #118
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
|
||||
import tornado
|
||||
from tornado.web import StaticFileHandler
|
||||
@@ -61,6 +62,10 @@ class WebServer:
|
||||
async def _start_inner(self):
|
||||
"""Start method (async). Sets up the Tornado application."""
|
||||
|
||||
# Bind the SSE broadcasters to the web server's loop, so they fire correctly
|
||||
self._spot_broadcaster.bind_to_web_server_loop()
|
||||
self._alert_broadcaster.bind_to_web_server_loop()
|
||||
|
||||
# Prepare a list of common arguments that are passed in to every API & page handler. This is just a basic thing
|
||||
# to avoid copy-pasting the same thing to every route declaration below.
|
||||
handler_opts = {"web_server_metrics": self.web_server_metrics}
|
||||
|
||||
Reference in New Issue
Block a user