Browse Source

Merge pull request #15218 in DESIGN/design from fbp/release to fbp/feature

* commit '19f2557a76323de67910740a415c046affb7fe05':
  REPORT-138804 【fr-fbp冒烟】用户切换工作目录,锁未释放
fbp/feature
superman 1 month ago
parent
commit
278da39827
  1. 3
      designer-base/src/main/java/com/fr/design/backup/EnvBackupHelper.java

3
designer-base/src/main/java/com/fr/design/backup/EnvBackupHelper.java

@ -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();
} }
} }

Loading…
Cancel
Save