|
|
@ -5,6 +5,7 @@ import com.fanruan.config.realm.ConfigRepositoryFactory; |
|
|
|
import com.fanruan.config.realm.local.LocalConfigRepositoryBuilder; |
|
|
|
import com.fanruan.config.realm.local.LocalConfigRepositoryBuilder; |
|
|
|
import com.fr.design.ConfigHelper; |
|
|
|
import com.fr.design.ConfigHelper; |
|
|
|
import com.fr.design.env.RemoteWorkspace; |
|
|
|
import com.fr.design.env.RemoteWorkspace; |
|
|
|
|
|
|
|
import com.fr.design.lock.TemplateLockInfoReSave; |
|
|
|
import com.fr.design.mem.MemConfigBackupManager; |
|
|
|
import com.fr.design.mem.MemConfigBackupManager; |
|
|
|
import com.fr.design.mem.MemConfigRepositoryBuilder; |
|
|
|
import com.fr.design.mem.MemConfigRepositoryBuilder; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
@ -123,6 +124,7 @@ public class EnvBackupHelper { |
|
|
|
// 如果原来是远程,要先发请求告诉原来的环境我这边要断开
|
|
|
|
// 如果原来是远程,要先发请求告诉原来的环境我这边要断开
|
|
|
|
if (origin instanceof RemoteWorkspace) { |
|
|
|
if (origin instanceof RemoteWorkspace) { |
|
|
|
origin.close(); |
|
|
|
origin.close(); |
|
|
|
|
|
|
|
TemplateLockInfoReSave.stopListener(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -131,6 +133,7 @@ public class EnvBackupHelper { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void rollbackEnv() { |
|
|
|
public void rollbackEnv() { |
|
|
|
if (origin instanceof RemoteWorkspace && ((RemoteWorkspace) origin).getClient() instanceof FineWorkspaceHttpClient) { |
|
|
|
if (origin instanceof RemoteWorkspace && ((RemoteWorkspace) origin).getClient() instanceof FineWorkspaceHttpClient) { |
|
|
|
|
|
|
|
TemplateLockInfoReSave.startListener(); |
|
|
|
((FineWorkspaceHttpClient) ((RemoteWorkspace) origin).getClient()).connect(); |
|
|
|
((FineWorkspaceHttpClient) ((RemoteWorkspace) origin).getClient()).connect(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|