private void keepPaceWithManager(List<TaskProfile> taskProfiles) {
        Map<String, TaskProfile> tasksFromManager = new ConcurrentHashMap<>();
        taskProfiles.forEach((profile) -> {
            TaskStateEnum state = profile.getState();
            if (state == TaskStateEnum.RUNNING || state == TaskStateEnum.FROZEN) {
                tasksFromManager.put(profile.getTaskId(), profile);
            } else {
                LOGGER.error("task {} invalid task state {}", profile, state);
            }
        });
        traverseManagerTasksToStore(tasksFromManager);
        traverseStoreTasksToManager(tasksFromManager);
    }
keep pace with data config from manager, task state should be only RUNNING or FROZEN.
NEW and STOP only used in manager
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/task/TaskManager.java