@Override
	public void run() {
		while(!Thread.interrupted()) {
			if(taskQueue.size() > 0) {
				Iterator<Task<Result>> iterator = taskQueue.iterator();
				while(iterator.hasNext()) {
					Task<Result> next = iterator.next();

					LOGGER.infop("Checking to run: %s", next);

					Machine machineToRunOn = checkDequeueItem(next);
					if(machineToRunOn != null) {
						iterator.remove();
						boolean interrupted = invokeTask(next, machineToRunOn);
						if(interrupted) {
							Thread.currentThread().interrupt();
							break;
						}
					}
				}
			} else {
				try {
					LOGGER.infop("Nothing in queue. Sleeping for a 5 seconds.");
					Thread.sleep(5 * SECONDS);
				} catch (InterruptedException e) {
					LOGGER.info("Interrupted queue. Attempting clean exit.");
					break;
				}
			}
		}

		LOGGER.warn("Queue thread has died.");
	}