diff --git a/config_webrx.py b/config_webrx.py index 11d8d30..227cad1 100644 --- a/config_webrx.py +++ b/config_webrx.py @@ -250,6 +250,17 @@ google_maps_api_key = "" # in seconds; default: 2 hours map_position_retention_time = 2 * 60 * 60 +# wsjt decoder queue configuration +# due to the nature of the wsjt operating modes (ft8, ft8, jt9, jt65 and wspr), the data is recorded for a given amount +# of time (6.5 seconds up to 2 minutes) and decoded at the end. this can lead to very high peak loads. +# to mitigate this, the recordings will be queued and processed in sequence. +# the number of workers will limit the total amount of work (one worker will losely occupy one cpu / thread) +wsjt_queue_workers = 2 +# the maximum queue length will cause decodes to be dumped if the workers cannot keep up +# if you are running background services, make sure this number is high enough to accept the task influx during peaks +# i.e. this should be higher than the number of wsjt services running at the same time +wsjt_queue_length = 10 + temporary_directory = "/tmp" services_enabled = False diff --git a/owrx/wsjt.py b/owrx/wsjt.py index 5c6ea8b..a12bd97 100644 --- a/owrx/wsjt.py +++ b/owrx/wsjt.py @@ -41,7 +41,8 @@ class WsjtQueue(Queue): @staticmethod def getSharedInstance(): if WsjtQueue.sharedInstance is None: - WsjtQueue.sharedInstance = WsjtQueue(maxsize=10, workers=2) + pm = PropertyManager.getSharedInstance() + WsjtQueue.sharedInstance = WsjtQueue(maxsize=pm["wsjt_queue_length"], workers=pm["wsjt_queue_workers"]) return WsjtQueue.sharedInstance def __init__(self, maxsize, workers):