optimalizations

This commit is contained in:
Jan Prochazka
2020-05-01 17:50:12 +02:00
parent 7d36ddbc04
commit d0533f3f08
6 changed files with 38 additions and 16 deletions

View File

@@ -42,10 +42,16 @@ async function handleConnect({ connection, structure }) {
storedConnection = connection;
lastPing = new Date().getTime();
setStatusName('pending');
if (!structure) setStatusName('pending');
else setStatusName('ok');
const driver = engines(storedConnection);
systemConnection = await driverConnect(driver, storedConnection);
handleFullRefresh();
if (structure) {
analysedStructure = structure;
handleIncrementalRefresh();
} else {
handleFullRefresh();
}
setInterval(handleIncrementalRefresh, 30 * 1000);
for (const [resolve] of afterConnectCallbacks) {
resolve();