private Runnable createRunnable(final T doc,
                                    final TaskContext parentTaskContext) {
        return () -> {
            if (!parentTaskContext.isTerminated()) {
                try {
                    execRule(doc, parentTaskContext);
                } catch (final RuntimeException e) {
                    LOGGER.error(() ->
                            LogUtil.message("Error executing {}: {}",
                                    processType,
                                    RuleUtil.getRuleIdentity(doc)), e);
                }
            }
        };
    }
Called at the end of execution to perform any tidy up operations.

@param analyticDocs The list of all known analyticDocs for this executor.
stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AbstractScheduledQueryExecutor.java