Browse Source

Merge pull request #15217 in DESIGN/design from fbp/master to fbp/release

* commit '39b85813fcba0dd1c78d673a05f81447079ef5f6':
  REPORT-138804 【fr-fbp冒烟】用户切换工作目录,锁未释放
fbp/merge
superman 2 months ago
parent
commit
19f2557a76
  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.fr.design.ConfigHelper;
import com.fr.design.env.RemoteWorkspace;
import com.fr.design.lock.TemplateLockInfoReSave;
import com.fr.design.mem.MemConfigBackupManager;
import com.fr.design.mem.MemConfigRepositoryBuilder;
import com.fr.log.FineLoggerFactory;
@ -123,6 +124,7 @@ public class EnvBackupHelper {
// 如果原来是远程,要先发请求告诉原来的环境我这边要断开
if (origin instanceof RemoteWorkspace) {
origin.close();
TemplateLockInfoReSave.stopListener();
}
}
@ -131,6 +133,7 @@ public class EnvBackupHelper {
*/
public void rollbackEnv() {
if (origin instanceof RemoteWorkspace && ((RemoteWorkspace) origin).getClient() instanceof FineWorkspaceHttpClient) {
TemplateLockInfoReSave.startListener();
((FineWorkspaceHttpClient) ((RemoteWorkspace) origin).getClient()).connect();
}
}

Loading…
Cancel
Save