@Scheduled(
            fixedDelayString = "${conductor.sweep-frequency.millis:500}",
            initialDelayString = "${conductor.sweep-frequency.millis:500}")
    public void pollAndSweep() {
        try {
            if (!isRunning()) {
                LOGGER.debug("Component stopped, skip workflow sweep");
            } else {
                List<String> workflowIds =
                        queueDAO.pop(DECIDER_QUEUE, sweeperThreadCount, sweeperWorkflowPollTimeout);
                if (workflowIds != null) {
                    // wait for all workflow ids to be "swept"
                    CompletableFuture.allOf(
                                    workflowIds.stream()
                                            .map(workflowSweeper::sweepAsync)
                                            .toArray(CompletableFuture[]::new))
                            .get();
                    LOGGER.debug(
                            "Sweeper processed {} from the decider queue",
                            String.join(",", workflowIds));
                }
                // NOTE: Disabling the sweeper implicitly disables this metric.
                recordQueueDepth();
            }
        } catch (Exception e) {
            Monitors.error(WorkflowReconciler.class.getSimpleName(), "poll");
            LOGGER.error("Error when polling for workflows", e);
            if (e instanceof InterruptedException) {
                // Restore interrupted state...
                Thread.currentThread().interrupt();
            }
        }
    }
Periodically polls all running workflows in the system and evaluates them for timeouts and/or
maintain consistency.
core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowReconciler.java