mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
reduced explorer interval
This commit is contained in:
parent
c89a809e6d
commit
d38b3bc672
2 changed files with 3 additions and 5 deletions
|
@ -24,7 +24,6 @@ class explorer():
|
||||||
self.config = self.config_manager.read()
|
self.config = self.config_manager.read()
|
||||||
self.states = states
|
self.states = states
|
||||||
self.explorer_url = "https://api.freedata.app/explorer.php"
|
self.explorer_url = "https://api.freedata.app/explorer.php"
|
||||||
self.publish_interval = 120
|
|
||||||
|
|
||||||
def push(self):
|
def push(self):
|
||||||
self.config = self.config_manager.read()
|
self.config = self.config_manager.read()
|
||||||
|
@ -40,11 +39,10 @@ class explorer():
|
||||||
|
|
||||||
# stop pushing if default callsign
|
# stop pushing if default callsign
|
||||||
if callsign in ['XX1XXX-6']:
|
if callsign in ['XX1XXX-6']:
|
||||||
# Reschedule the push method
|
|
||||||
self.scheduler.enter(self.publish_interval, 1, self.push)
|
|
||||||
return
|
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"}
|
headers = {"Content-Type": "application/json"}
|
||||||
station_data = {'callsign': callsign, 'gridsquare': gridsquare, 'frequency': frequency, 'strength': strength, 'band': band, 'version': version, 'bandwidth': bandwidth, 'beacon': beacon, "lastheard": []}
|
station_data = {'callsign': callsign, 'gridsquare': gridsquare, 'frequency': frequency, 'strength': strength, 'band': band, 'version': version, 'bandwidth': bandwidth, 'beacon': beacon, "lastheard": []}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class ScheduleManager:
|
||||||
self.scheduler = sched.scheduler(time.time, time.sleep)
|
self.scheduler = sched.scheduler(time.time, time.sleep)
|
||||||
self.events = {
|
self.events = {
|
||||||
'check_for_queued_messages': {'function': self.check_for_queued_messages, 'interval': 10},
|
'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},
|
'transmitting_beacon': {'function': self.transmit_beacon, 'interval': self.beacon_interval},
|
||||||
'beacon_cleanup': {'function': self.delete_beacons, 'interval': 600},
|
'beacon_cleanup': {'function': self.delete_beacons, 'interval': 600},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue