mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-29 02:32:05 +00:00
Enable POTA upstream logging as this was previously proved. #95 Improve logging
This commit is contained in:
@@ -57,9 +57,8 @@ class POTA(HTTPSpotProvider):
|
|||||||
new_spots.append(spot)
|
new_spots.append(spot)
|
||||||
return new_spots
|
return new_spots
|
||||||
|
|
||||||
# Upstream spotting disabled until properly tested
|
|
||||||
def can_submit_spot(self, activity):
|
def can_submit_spot(self, activity):
|
||||||
return False # return activity == ActivityName.POTA
|
return activity == ActivityName.POTA
|
||||||
|
|
||||||
def submit_spot(self, spot, credentials):
|
def submit_spot(self, spot, credentials):
|
||||||
ref_id = spot.activity_refs[0].id if spot.activity_refs else None
|
ref_id = spot.activity_refs[0].id if spot.activity_refs else None
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
const ALLOW_UPSTREAM_SPOTTING = {% raw safe_json_dumps(web_ui_options["allow_upstream_spotting"]) %};
|
const ALLOW_UPSTREAM_SPOTTING = {% raw safe_json_dumps(web_ui_options["allow_upstream_spotting"]) %};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/js/add-spot.js?v=1790516268"></script>
|
<script src="/static/js/add-spot.js?v=1790516659"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-add-spot").addClass("active");
|
$("#nav-link-add-spot").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/alerts.js?v=1790516268"></script>
|
<script src="/static/js/alerts.js?v=1790516658"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-alerts").addClass("active");
|
$("#nav-link-alerts").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -82,8 +82,8 @@
|
|||||||
const BANDS = {% raw safe_json_dumps(options["bands"]) %};
|
const BANDS = {% raw safe_json_dumps(options["bands"]) %};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/js/spotsbandsandmap.js?v=1790516268"></script>
|
<script src="/static/js/spotsbandsandmap.js?v=1790516658"></script>
|
||||||
<script src="/static/js/bands.js?v=1790516268"></script>
|
<script src="/static/js/bands.js?v=1790516658"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-bands").addClass("active");
|
$("#nav-link-bands").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
{% extends "skeleton.html" %}
|
{% extends "skeleton.html" %}
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/css/style.css?v=1790516268" type="text/css">
|
<link rel="stylesheet" href="/static/css/style.css?v=1790516658" type="text/css">
|
||||||
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
||||||
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
|
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
|
||||||
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
|
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
window.fetchEventSource = fetchEventSource;
|
window.fetchEventSource = fetchEventSource;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/js/utils.js?v=1790516268"></script>
|
<script src="/static/js/utils.js?v=1790516658"></script>
|
||||||
<script src="/static/js/ui-ham.js?v=1790516268"></script>
|
<script src="/static/js/ui-ham.js?v=1790516658"></script>
|
||||||
<script src="/static/js/geo.js?v=1790516268"></script>
|
<script src="/static/js/geo.js?v=1790516658"></script>
|
||||||
<script src="/static/js/common.js?v=1790516268"></script>
|
<script src="/static/js/common.js?v=1790516658"></script>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -284,7 +284,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
|
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
|
||||||
<script src="/static/js/conditions.js?v=1790516268"></script>
|
<script src="/static/js/conditions.js?v=1790516658"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-conditions").addClass("active");
|
$("#nav-link-conditions").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
+2
-2
@@ -115,8 +115,8 @@
|
|||||||
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
|
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/js/spotsbandsandmap.js?v=1790516267"></script>
|
<script src="/static/js/spotsbandsandmap.js?v=1790516657"></script>
|
||||||
<script src="/static/js/map.js?v=1790516267"></script>
|
<script src="/static/js/map.js?v=1790516657"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-map").addClass("active");
|
$("#nav-link-map").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -127,8 +127,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/spotsbandsandmap.js?v=1790516267"></script>
|
<script src="/static/js/spotsbandsandmap.js?v=1790516657"></script>
|
||||||
<script src="/static/js/spots.js?v=1790516267"></script>
|
<script src="/static/js/spots.js?v=1790516657"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-spots").addClass("active");
|
$("#nav-link-spots").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/status.js?v=1790516268"></script>
|
<script src="/static/js/status.js?v=1790516658"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#nav-link-status").addClass("active");
|
$("#nav-link-status").addClass("active");
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ class APISpotHandler(tornado.web.RequestHandler):
|
|||||||
spot.source = "API"
|
spot.source = "API"
|
||||||
spot.infer_missing()
|
spot.infer_missing()
|
||||||
self._spots.set(spot.id, spot)
|
self._spots.set(spot.id, spot)
|
||||||
|
logger.info(f"Spot of {spot.dx_call} by {spot.de_call} added to Spothole.")
|
||||||
|
|
||||||
if upstream_warnings:
|
if upstream_warnings:
|
||||||
saved_locally_note = "" if any_upstream_succeeded else " The spot was saved to Spothole only."
|
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
|
# Submit spot to the upstream provider. Run in a separate thread otherwise this blocks the whole web server
|
||||||
# for everyone!
|
# for everyone!
|
||||||
await IOLoop.current().run_in_executor(None, provider.submit_spot, spot, credentials)
|
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
|
# 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
|
# 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)
|
# is really just for the HTTP providers when we submit a spot to them)
|
||||||
|
|||||||
Reference in New Issue
Block a user