Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
netort committed Jan 24, 2018
1 parent 82b5ec5 commit 48668dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions volta/listeners/uploader/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def dump_jobno_to_file(self):
jobnofile.write(
"{path}/mobile/{jobno}".format(path=self.hostname, jobno=self.jobno)
)
except:
except Exception:
logger.error('Failed to dump jobno to file: %s', self.JOBNO_FNAME, exc_info=True)

def update_job(self, data):
Expand All @@ -97,12 +97,14 @@ def update_job(self, data):
return

def get_info(self):
""" mock """
pass

def close(self):
self.worker.stop()
while not self.worker.is_finished():
logger.debug('Processing pending uploader queue... qsize: %s', self.inner_queue.qsize())
logger.debug('Joining uploader thread...')
self.worker.join()
logger.info('Uploader finished!')

Expand All @@ -127,7 +129,7 @@ def run(self):
self.__get_from_queue_prepare_and_send()
logger.info('Uploader thread main loop interrupted, '
'finishing work and trying to send the rest of data, qsize: %s',
self.uploader.inner_queue)
self.uploader.inner_queue.qsize())
self.__get_from_queue_prepare_and_send()
self._finished.set()

Expand Down

0 comments on commit 48668dd

Please sign in to comment.