From d38b3bc6729d7d6096632000d5b364fa4d902ae7 Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Sat, 10 Feb 2024 11:05:10 +0100 Subject: [PATCH] reduced explorer interval --- modem/explorer.py | 6 ++---- modem/schedule_manager.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modem/explorer.py b/modem/explorer.py index 90ba3e13..d7c4ccc6 100644 --- a/modem/explorer.py +++ b/modem/explorer.py @@ -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": []} diff --git a/modem/schedule_manager.py b/modem/schedule_manager.py index fa33b948..93b62823 100644 --- a/modem/schedule_manager.py +++ b/modem/schedule_manager.py @@ -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}, }