Beispiel #1
0
 def release_locks(self):
     try:
         sync_manager.persistent_locks_release(self._locks, self.id)
     except InconsistentLockError as e:
         logger.error('Job {0}: some of the locks {1} are already acquired by another '
             'job {2}'.format(self.id, self._locks, e.holder_id))
         pass
Beispiel #2
0
 def release_locks(self):
     try:
         sync_manager.persistent_locks_release(self._locks, self.id)
     except InconsistentLockError as e:
         logger.error(
             'Job {0}: some of the locks {1} are already acquired by another '
             'job {2}'.format(self.id, self._locks, e.holder_id))
         pass
    def host_release_lock(self, request):

        try:
            host = request[0]
        except IndexError:
            raise ValueError('Host is required')

        check_host(host)

        lock_id = self.HOST_LOCK.format(host)
        sync_manager.persistent_locks_release([lock_id])

        return lock_id
Beispiel #4
0
    def host_release_lock(self, request):

        try:
            host = request[0]
        except IndexError:
            raise ValueError('Host is required')

        check_host(host)

        lock_id = self.HOST_LOCK.format(host)
        sync_manager.persistent_locks_release([lock_id])

        return lock_id