private void restoreFromStore() {
        LOGGER.info("restore from task store start");
        List<TaskProfile> taskProfileList = taskStore.getTasks();
        taskProfileList.forEach((profile) -> {
            if (profile.getState() == TaskStateEnum.RUNNING) {
                LOGGER.info("restore from task store taskId {}", profile.getTaskId());
                profile.setBoolean(RESTORE_FROM_DB, true);
                addToMemory(profile);
            }
        });
        LOGGER.info("restore from task store end");
    }
add task profile to task store
if task state is RUNNING then add task to memory
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/task/TaskManager.java