protect pskreporter upload loop
This commit is contained in:
parent
31881ce472
commit
455001a759
@ -57,12 +57,15 @@ class PskReporter(object):
|
|||||||
self.spots.append(spot)
|
self.spots.append(spot)
|
||||||
|
|
||||||
def upload(self):
|
def upload(self):
|
||||||
with self.spotLock:
|
try:
|
||||||
spots = self.spots
|
with self.spotLock:
|
||||||
self.spots = []
|
spots = self.spots
|
||||||
|
self.spots = []
|
||||||
|
|
||||||
if spots:
|
if spots:
|
||||||
self.uploader.upload(spots)
|
self.uploader.upload(spots)
|
||||||
|
except Exception:
|
||||||
|
logger.exception("Failed to upload spots")
|
||||||
|
|
||||||
self.scheduleNextUpload()
|
self.scheduleNextUpload()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user