@Override
    public ProcessorTaskList assignTasks(final TaskId sourceTaskId,
                                         final String nodeName,
                                         final int count) {
        final Supplier<ProcessorTaskList> runnable = taskContextFactory.contextResult(
                "Assign Tasks",
                TerminateHandlerFactory.NOOP_FACTORY,
                taskContext -> {
                    try {
                        taskContext.getTaskId().setParentId(sourceTaskId);
                        return assignTasks(nodeName, count, taskContext);
                    } catch (final RuntimeException e) {
                        LOGGER.error(e.getMessage(), e);
                    }
                    return null;
                });
        return runnable.get();
    }
Return the next task to perform. Called by worker threads. Also assigns
the task to the node asking for the job
stroom-processor/stroom-processor-impl/src/main/java/stroom/processor/impl/ProcessorTaskQueueManagerImpl.java