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