add some debugging here
This commit is contained in:
parent
aad904f1a1
commit
a30841cdf6
@ -2,6 +2,7 @@ from datetime import datetime, timedelta
|
||||
import threading, time
|
||||
from owrx.config import PropertyManager
|
||||
from owrx.bands import Band
|
||||
import sys
|
||||
|
||||
import logging
|
||||
|
||||
@ -15,9 +16,11 @@ class Location(object):
|
||||
|
||||
class Map(object):
|
||||
sharedInstance = None
|
||||
creationLock = threading.Lock()
|
||||
|
||||
@staticmethod
|
||||
def getSharedInstance():
|
||||
with Map.creationLock:
|
||||
if Map.sharedInstance is None:
|
||||
Map.sharedInstance = Map()
|
||||
return Map.sharedInstance
|
||||
@ -111,9 +114,11 @@ class Map(object):
|
||||
self.removeLocation(callsign)
|
||||
|
||||
def rebuildPositions(self):
|
||||
logger.debug("rebuilding map storage; size before: %i", sys.getsizeof(self.positions))
|
||||
with self.positionsLock:
|
||||
p = {key: value for key, value in self.positions.items()}
|
||||
self.positions = p
|
||||
logger.debug("rebuild complete; size after: %i", sys.getsizeof(self.positions))
|
||||
|
||||
|
||||
class LatLngLocation(Location):
|
||||
|
Loading…
Reference in New Issue
Block a user