optimize task deletion logic. When the cluster instance status is healthy, it needs to be stopped first. (#2929)