private void fillTaskQueueSync(final boolean isEmptyReportRequired) {
        if (allowTaskQueueFill) {
            try {
                LOGGER.debug("fillTaskQueueAsync() - Executing fillTaskQueue");
                securityContext.asProcessingUser(() ->
                        taskContextFactory.context(
                                "Fill task queue",
                                taskContext -> queueNewTasks(taskContext, isEmptyReportRequired)).run());

            } catch (final RuntimeException e) {
                fillingQueue.set(false);
                LOGGER.error(e::getMessage, e);
            }
        }
    }
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