break the pskreporter loop if there's nothing to upload
This commit is contained in:
parent
8f9f9e8397
commit
eef61f9d1e
@ -86,6 +86,7 @@ class PskReporter(object):
|
|||||||
def upload(self):
|
def upload(self):
|
||||||
try:
|
try:
|
||||||
with self.spotLock:
|
with self.spotLock:
|
||||||
|
self.timer = None
|
||||||
spots = self.spots
|
spots = self.spots
|
||||||
self.spots = []
|
self.spots = []
|
||||||
|
|
||||||
@ -94,9 +95,6 @@ class PskReporter(object):
|
|||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Failed to upload spots")
|
logger.exception("Failed to upload spots")
|
||||||
|
|
||||||
self.timer = None
|
|
||||||
self.scheduleNextUpload()
|
|
||||||
|
|
||||||
def cancelTimer(self):
|
def cancelTimer(self):
|
||||||
if self.timer:
|
if self.timer:
|
||||||
self.timer.cancel()
|
self.timer.cancel()
|
||||||
|
Loading…
Reference in New Issue
Block a user