def enqueue(self, log, result_queue, issue_id): 'Add a result entry to the result queue' log.debug('Adding Issue(%d) to queue' % issue_id) metadata = utils.build_meta(log, issue_id) if metadata: self.clean_downloaded_metadata(metadata) with self._qlock: result_queue.put(metadata) log.debug('Added Issue(%s) to queue' % metadata.title)
def enqueue(self, log, result_queue, shutdown, issue_id): 'Add a result entry to the result queue' if shutdown.is_set(): raise threading.ThreadError log.debug('Adding Issue(%d) to queue' % issue_id) metadata = utils.build_meta(log, issue_id) if metadata: self.clean_downloaded_metadata(metadata) with self._qlock: result_queue.put(metadata) log.debug('Added Issue(%s) to queue' % metadata.title)