private void freezeTask(TaskProfile taskProfile) {
        updateToStore(taskProfile);
        deleteFromMemory(taskProfile.getTaskId());
    }
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