def _Renew(self, client):
    def _OnException(type, value, tb):
      """If failure occurs during renewal, just abandon the lock."""
      logging.error('failure trying to renew lock "%s"', exc_info=(type, value, tb))

    def _OnRenewalTimeout():
      self._timeout = None
      if not self._renewing:
        return
      logging.info('renewing lock: %s' % self)

      with util.Barrier(_ScheduleNextRenew, on_exception=_OnException) as b:
        self.expiration = time.time() + Lock.ABANDONMENT_SECS
        self.Update(client, b.Callback())

    def _ScheduleNextRenew():
      if not self._renewing:
        return
      self._timeout = IOLoop.current().add_timeout(timedelta(seconds=Lock.LOCK_RENEWAL_SECS), _OnRenewalTimeout)

    self._renewing = True
    _ScheduleNextRenew()
Continually renews the lock by updating its expiration on a regular
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/lock.py/Lock._Renew