Projects >> jesque >>fd7105b2504d32d745b7ae97d016dddd2488891f

Chunk
Conflicting content
		{
	}

	/**
<<<<<<< HEAD
	 * Remove the metadata about a worker
	 *
	 * @param workerName The worker name to remove
	 */
	public void removeWorker(final String workerName) {
		PoolUtils.doWorkInPoolNicely(this.jedisPool, new PoolWork()
		{
			public Void doWork(final Jedis jedis)
			throws Exception
			{
				jedis.srem(key(WORKERS), workerName);
				jedis.del(
					key(WORKER, workerName),
					key(WORKER, workerName, STARTED),
					key(STAT, FAILED, workerName),
					key(STAT, PROCESSED, workerName));
				return null;
			}
		});
=======
	 * Keep trying to parse the date using all known formats
	 * 
	 * @param dateStr the string to be parsed
	 * @return the parsed date
	 * @throws ParseException if the date format is unknown
	 */
	private static Date parseDate(final String dateStr)
	throws ParseException
	{
		Date date = null;
		try
		{
			date = ResqueDateFormatThreadLocal.getInstance().parse(dateStr);
		}
		catch (ParseException pe){}
		if (date == null)
			try
			{
				date = new SimpleDateFormat(DATE_FORMAT_RUBY).parse(dateStr);
			}
			catch (ParseException pe){}
		}
		if (date == null)
		{
			try
			{
				date = new SimpleDateFormat(DATE_FORMAT_PHP).parse(dateStr);
			}
			catch (ParseException pe){}
		}
		if (date == null)
		{
			throw new ParseException("Unparseable date: \"" + dateStr + "\"" , 0);
		}
		return date;
>>>>>>> 909236c7a4a7aa15f9b332a2fa51bcc000c9b648
	}
}
Solution content
	}

	/**
	 * Remove the metadata about a worker
	 *
	 * @param workerName The worker name to remove
	 */
	public void removeWorker(final String workerName)
	{
		PoolUtils.doWorkInPoolNicely(this.jedisPool, new PoolWork()
		{
			public Void doWork(final Jedis jedis)
			throws Exception
			{
				jedis.srem(key(WORKERS), workerName);
				jedis.del(
					key(WORKER, workerName),
					key(WORKER, workerName, STARTED),
					key(STAT, FAILED, workerName),
					key(STAT, PROCESSED, workerName));
				return null;
			}
		});
	}
	
	/**
	 * Keep trying to parse the date using all known formats
	 * 
	 * @param dateStr the string to be parsed
	 * @return the parsed date
	 * @throws ParseException if the date format is unknown
	 */
	private static Date parseDate(final String dateStr)
	throws ParseException
	{
		Date date = null;
		try
		{
			date = ResqueDateFormatThreadLocal.getInstance().parse(dateStr);
		}
		catch (ParseException pe){}
		if (date == null)
		{
			try
			{
				date = new SimpleDateFormat(DATE_FORMAT_RUBY).parse(dateStr);
			}
			catch (ParseException pe){}
		}
		if (date == null)
		{
			try
			{
				date = new SimpleDateFormat(DATE_FORMAT_PHP).parse(dateStr);
			}
			catch (ParseException pe){}
		}
		if (date == null)
		{
			throw new ParseException("Unparseable date: \"" + dateStr + "\"" , 0);
		}
		return date;
	}
}
File
WorkerInfoDAORedisImpl.java
Developer's decision
Concatenation
Kind of conflict
Comment
If statement
Method invocation
Method signature
Return statement
Try statement
Variable
Chunk
Conflicting content
	
	private static final Logger log = LoggerFactory.getLogger(WorkerImpl.class);
	private static final AtomicLong workerCounter = new AtomicLong(0);
<<<<<<< HEAD
	protected static final long emptyQueueSleepTime = 500; // 500 ms

=======
	private static final long emptyQueueSleepTime = 500; // 500ms
	private static final long reconnectSleepTime = 5000; // 5s
	private static final int reconnectAttempts = 120; // Total time: 10min
	
>>>>>>> 909236c7a4a7aa15f9b332a2fa51bcc000c9b648
	/**
	 * Verify that the given queues are all valid.
	 * 
Solution content
	
	private static final Logger log = LoggerFactory.getLogger(WorkerImpl.class);
	private static final AtomicLong workerCounter = new AtomicLong(0);
	protected static final long emptyQueueSleepTime = 500; // 500 ms
	private static final long reconnectSleepTime = 5000; // 5s
	private static final int reconnectAttempts = 120; // Total time: 10min

	/**
	 * Verify that the given queues are all valid.
	 * 
File
WorkerImpl.java
Developer's decision
Combination
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
		"Worker-" + this.workerId + " Jesque-" + VersionUtils.getVersion() + ": ";
	private final AtomicReference workerThreadRef =
		new AtomicReference(null);
<<<<<<< HEAD

=======
	private final AtomicReference exceptionHandlerRef = 
		new AtomicReference(new DefaultWorkerExceptionHandler());
	
>>>>>>> 909236c7a4a7aa15f9b332a2fa51bcc000c9b648
	/**
	 * Creates a new WorkerImpl, which creates it's own connection to 
	 * Redis using values from the config. The worker will only listen 
Solution content
		"Worker-" + this.workerId + " Jesque-" + VersionUtils.getVersion() + ": ";
	private final AtomicReference workerThreadRef =
		new AtomicReference(null);
	private final AtomicReference exceptionHandlerRef = 
		new AtomicReference(new DefaultWorkerExceptionHandler());

	/**
	 * Creates a new WorkerImpl, which creates it's own connection to 
	 * Redis using values from the config. The worker will only listen 
File
WorkerImpl.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation