src/main/java/com/redislabs/quartz/RedisJobStore.java
/**
	 * Release triggers locked by an instance id.
	 *
	 * @param lockedByInstanceId the locking instance id
	 * @param currentState the current locking state
	 * @param newState the new trigger's state
	 */
Release triggers locked by an instance id.
@param lockedByInstanceId the locking instance id
@param currentState the current locking state
@param newState the new trigger's state
Release triggers locked by an instance id . @param lockedByInstanceId the locking instance id @param currentState the current locking state @param newState the new trigger ' s state
private void releaseLockedTriggers(String lockedByInstanceId, RedisTriggerState currentState, RedisTriggerState newState) {
      try (Jedis jedis = pool.getResource()) {
         lockPool.acquire();
			Set<Tuple> triggerTuples = jedis.zrangeWithScores(currentState.getKey(), 0, -1);
			for (Tuple triggerTuple : triggerTuples) {
				if (lockedByInstanceId != null && lockedByInstanceId.equals(jedis.hget(triggerTuple.getElement(), LOCKED_BY))) {
					log.debug("releasing trigger: " + triggerTuple.getElement() + " from: " + currentState.getKey());
					setTriggerState(newState, triggerTuple.getScore(), triggerTuple.getElement());
				}					
			}			
		} catch (Exception ex) {
			log.error("could not release locked triggers in: " + currentState.getKey(), ex);
		} finally {
         lockPool.release();
		}						
	}
private void releaseLockedTriggers ( String lockedByInstanceId , RedisTriggerState currentState , RedisTriggerState newState ) { try ( Jedis jedis = pool . getResource ( ) ) { lockPool . acquire ( ) ; Set < Tuple > triggerTuples = jedis . zrangeWithScores ( currentState . getKey ( ) , 0 , - 1 ) ; for ( Tuple triggerTuple : triggerTuples ) { if ( lockedByInstanceId != null && lockedByInstanceId . equals ( jedis . hget ( triggerTuple . getElement ( ) , LOCKED_BY ) ) ) { log . debug ( "releasing trigger: " + triggerTuple . getElement ( ) + " from: " + currentState . getKey ( ) ) ; setTriggerState ( newState , triggerTuple . getScore ( ) , triggerTuple . getElement ( ) ) ; } } } catch ( Exception ex ) { log . error ( "could not release locked triggers in: " + currentState . getKey ( ) , ex ) ; } finally { lockPool . release ( ) ; } }
Release triggers locked by an instance id.
Release triggers locked by an instance id .