Skip to content

Commit

Permalink
Improve startup speed
Browse files Browse the repository at this point in the history
  • Loading branch information
Chat2DB-Pro committed Dec 13, 2023
1 parent 8b0cbb4 commit 7399c7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chat2db-client/src/main/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ contextBridge.exposeInMainWorld('electronApi', {

const child = spawn(path.join(__dirname, '../..', `./static/${JAVA_PATH}`), [
'-noverify',
'-jar',
'-Xmx1024M',
`-Dspring.profiles.active=${isTest ? 'test' : 'release'}`,
'-Dserver.address=127.0.0.1',
'-Dchat2db.mode=DESKTOP',
`-Dproject.path=${javaPath}`,
`-Dloader.path=${libPath}`,
`-Dclient.version=${readVersion()}`,
'-Xmx1024M',
'-jar',
javaPath,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public DataResult<SystemVO> get() {
String clientVersion = System.getProperty("client.version");
String version = ConfigUtils.getLatestLocalVersion();
log.error("clientVersion:{},version:{}", clientVersion, version);
if (!StringUtils.equals(clientVersion, version)) {
if (!StringUtils.equals(clientVersion, version) && !StringUtils.isEmpty(clientVersion)) {
stop();
return null;
} else {
Expand Down Expand Up @@ -146,7 +146,7 @@ public DataResult<String> stop(boolean forceQuit) {
// String version = ConfigUtils.getLatestLocalVersion();
// log.error("clientVersion:{},version:{}", clientVersion, version);
// if (!StringUtils.equals(clientVersion, version)) {
stop();
stop();
//}
}
return DataResult.of("ok");
Expand Down

0 comments on commit 7399c7f

Please sign in to comment.