split config and property code, first test

This commit is contained in:
Jakob Ketterl
2020-03-21 22:40:39 +01:00
parent 7948b7bfa1
commit 541c38151f
24 changed files with 210 additions and 193 deletions

View File

@ -1,7 +1,8 @@
from datetime import datetime, timedelta
import threading, time
from owrx.config import PropertyManager
from owrx.config import Config
from owrx.bands import Band
import threading
import time
import sys
import logging
@ -105,7 +106,7 @@ class Map(object):
# TODO broadcast removal to clients
def removeOldPositions(self):
pm = PropertyManager.getSharedInstance()
pm = Config.get()
retention = timedelta(seconds=pm["map_position_retention_time"])
cutoff = datetime.now() - retention