Skip to content

Commit

Permalink
fix: fixed sqlite-bree wsp issue
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed May 7, 2024
1 parent 7b46b57 commit cd5f699
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions ecosystem-sqlite.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{
"name": "sqlite-bree",
"script": "sqlite-bree.js",
"max_memory_restart": "8G",
"exec_mode": "fork",
"wait_ready": true,
"instances": "1",
Expand Down
10 changes: 1 addition & 9 deletions jobs/cleanup-sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ const sharedConfig = require('@ladjs/shared-config');
const Aliases = require('#models/aliases');
const Domains = require('#models/domains');
const config = require('#config');
const createWebSocketAsPromised = require('#helpers/create-websocket-as-promised');
const emailHelper = require('#helpers/email');
const i18n = require('#helpers/i18n');
const logger = require('#helpers/logger');
const setupMongoose = require('#helpers/setup-mongoose');
const wsp = require('#helpers/wsp-server');

const breeSharedConfig = sharedConfig('BREE');
const client = new Redis(breeSharedConfig.redis, logger);
Expand Down Expand Up @@ -81,8 +81,6 @@ const mountDir = config.env === 'production' ? '/mnt' : tmpdir;

subscriber.subscribe('sqlite_auth_response');

const wsp = createWebSocketAsPromised();

try {
if (isCancelled) return;

Expand Down Expand Up @@ -368,12 +366,6 @@ const mountDir = config.env === 'production' ? '/mnt' : tmpdir;
});
}

try {
wsp.close();
} catch (err) {
logger.fatal(err);
}

if (parentPort) parentPort.postMessage('done');
else process.exit(0);
})();

0 comments on commit cd5f699

Please sign in to comment.