reduced explorer interval

This commit is contained in:
DJ2LS 2024-02-10 11:05:10 +01:00
parent c89a809e6d
commit d38b3bc672
2 changed files with 3 additions and 5 deletions

View file

@ -24,7 +24,6 @@ class explorer():
self.config = self.config_manager.read()
self.states = states
self.explorer_url = "https://api.freedata.app/explorer.php"
self.publish_interval = 120
def push(self):
self.config = self.config_manager.read()
@ -40,11 +39,10 @@ class explorer():
# stop pushing if default callsign
if callsign in ['XX1XXX-6']:
# Reschedule the push method
self.scheduler.enter(self.publish_interval, 1, self.push)
return
log.info("[EXPLORER] publish", frequency=frequency, band=band, callsign=callsign, gridsquare=gridsquare, version=version, bandwidth=bandwidth)
# disabled this one
# log.info("[EXPLORER] publish", frequency=frequency, band=band, callsign=callsign, gridsquare=gridsquare, version=version, bandwidth=bandwidth)
headers = {"Content-Type": "application/json"}
station_data = {'callsign': callsign, 'gridsquare': gridsquare, 'frequency': frequency, 'strength': strength, 'band': band, 'version': version, 'bandwidth': bandwidth, 'beacon': beacon, "lastheard": []}

View file

@ -21,7 +21,7 @@ class ScheduleManager:
self.scheduler = sched.scheduler(time.time, time.sleep)
self.events = {
'check_for_queued_messages': {'function': self.check_for_queued_messages, 'interval': 10},
'explorer_publishing': {'function': self.push_to_explorer, 'interval': 120},
'explorer_publishing': {'function': self.push_to_explorer, 'interval': 60},
'transmitting_beacon': {'function': self.transmit_beacon, 'interval': self.beacon_interval},
'beacon_cleanup': {'function': self.delete_beacons, 'interval': 600},
}