Example #1
0
 def _do_resolve(self, rel):
     try:
         self._do_do_resolve(rel)
     # TODO Fail on permanent errors
     except Exception:
         #logging.warning('Failed to list_latest_releases for %s: %s' % (rel.request, e))
         logging.exception('Failed to list_latest_releases for %s' % (rel.request,))
         delayed_executor.schedule(lambda : self._resolve(rel), timeout=self._RETRY_INTERVAL)
Example #2
0
    def _schedule_retry(self, job, action, delay):
        with self.lock:
            if delay:
                self.jobs_to_retry[job.id] = action

                delayed_executor.schedule(
                    # Unfortunatly delayed_executor has magic about arg count
                    lambda _, id=job.id: self._initiate_retry(id),
                    timeout=delay)
            else:
                self._initiate_retry_inner(job.id, action)
Example #3
0
 def _schedule(self, pck, impl, timeout=None):
     logging.debug("++ ._schedule(%s, %s, timeout=%s)" % (pck, impl, timeout))
     wrap = lambda id: self._execute_scheduled(pck, id, impl)
     pck._sched = delayed_executor.schedule(wrap, timeout=timeout)
Example #4
0
 def _schedule_time_wait_stop(self):
     self.time_wait_sched = \
         delayed_executor.schedule(self._stop_time_wait, deadline=self.time_wait_deadline)