def _TryResurrect(self):
    if not self._down_on:
      return

    last_attempt = self._down_on
    wait_interval = self._initial_wait_interval
    self._log.info('Attempting to reopen faulted channel')
    while True:
      gevent.sleep(wait_interval)
      now = time.time()
      down_time, last_attempt = last_attempt - now, now
      self._varz.time_failed(down_time)

      sink = self._next_factory.CreateSink(self._properties)
      try:
        self._varz.reconnect_attempts()
        sink.Open().get()
        sink.on_faulted.Subscribe(self._OnSinkFaulted)
        self.next_sink = sink
        self._down_on = None
        self._log.info('Reopened channel.')
        return
      except GreenletExit:
        return
      except:
        sink.Close()

      wait_interval **= self._backoff_exponent
      wait_interval = min(wait_interval, self._max_wait_interval)
dataset/ETHPy150Open steveniemitz/scales/scales/resurrector.py/ResurrectorSink._TryResurrect/swapped operands of `-`