mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-28 18:22:05 +00:00
Enable POTA upstream logging as this was previously proved. #95 Improve logging
This commit is contained in:
@@ -214,6 +214,7 @@ class APISpotHandler(tornado.web.RequestHandler):
|
||||
spot.source = "API"
|
||||
spot.infer_missing()
|
||||
self._spots.set(spot.id, spot)
|
||||
logger.info(f"Spot of {spot.dx_call} by {spot.de_call} added to Spothole.")
|
||||
|
||||
if upstream_warnings:
|
||||
saved_locally_note = "" if any_upstream_succeeded else " The spot was saved to Spothole only."
|
||||
@@ -245,6 +246,9 @@ class APISpotHandler(tornado.web.RequestHandler):
|
||||
# Submit spot to the upstream provider. Run in a separate thread otherwise this blocks the whole web server
|
||||
# for everyone!
|
||||
await IOLoop.current().run_in_executor(None, provider.submit_spot, spot, credentials)
|
||||
logger.info(
|
||||
f"Spot of {spot.dx_call} by {spot.de_call} submitted upstream to {upstream_provider_name}."
|
||||
)
|
||||
# Trigger a re-poll after 3 second so the spot appears quickly. (Submitting to a cluster node is slower than
|
||||
# this, but we get data as a live stream from cluster anyway, so force_poll does nothing in that case. This
|
||||
# is really just for the HTTP providers when we submit a spot to them)
|
||||
|
||||
Reference in New Issue
Block a user