private void handleResult(
            final String nodeName,
            final String jobName,
            final List<DistributedTask> tasks) {
        try {
            LOGGER.debug(() -> LogUtil.message("Task response: node=\"{}\"", nodeName));
            LOGGER.trace(() -> LogUtil.message("\nTask response: node=\"{}\"\n{}", nodeName, tasks));

            // Get the current time to record execution.
            final long now = System.currentTimeMillis();

            // Execute the returned tasks.
            final JobNodeTrackers trackers = jobNodeTrackerCache.getTrackers();
            taskStatusTraceLog.receiveOnWorkerNode(DistributedTaskFetcher.class, tasks, jobName);

            if (!stopping.get()) {
                // Get the latest local tracker.
                final JobNodeTracker tracker = trackers.getTrackerForJobName(jobName);
                // Try and get more tasks.
                tasks.forEach(task -> {
                    runningTasks.add(task);
                    tracker.incrementTaskCount();
                    tracker.setLastExecutedTime(now);

                    if (!stopping.get()) {
                        final Executor executor = executorProvider.get(task.getThreadPool());
                        CompletableFuture
                                .runAsync(task.getRunnable(), executor)
                                .whenComplete((r, t) -> {
                                    runningTasks.remove(task);
                                    tracker.decrementTaskCount();
                                    signal();
                                });
                    } else {
                        runningTasks.remove(task);
                        tracker.decrementTaskCount();
                    }
                });
            }
        } catch (final RuntimeException e) {
            LOGGER.error(e::getMessage, e);
        }
    }
Tries to fetch tasks asynchronously if we aren't already fetching tasks.
If we are it will make sure we immediately try and fetch tasks again
after the previous fetch.
stroom-job/stroom-job-impl/src/main/java/stroom/job/impl/DistributedTaskFetcher.java