コード例 #1
0
ファイル: job.py プロジェクト: shaitan/mastermind
 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
コード例 #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
コード例 #3
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
コード例 #4
0
ファイル: manual_locks.py プロジェクト: shaitan/mastermind
    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