1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

chore: workers debug config

This commit is contained in:
2022-03-01 22:15:33 +01:00
parent 1a9fc37285
commit a5c8daa5b8
2 changed files with 19 additions and 5 deletions

14
.vscode/launch.json vendored
View File

@ -2,8 +2,8 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"cwd": "${workspaceFolder}",
"name": "Electron: Main", "name": "Electron: Main",
"cwd": "${workspaceFolder}",
"port": 9222, "port": 9222,
"protocol": "inspector", "protocol": "inspector",
"request": "attach", "request": "attach",
@ -18,7 +18,17 @@
"sourceMaps": true, "sourceMaps": true,
"type": "chrome", "type": "chrome",
"webRoot": "${workspaceFolder}" "webRoot": "${workspaceFolder}"
} },
{
"name": "Electron: Worker",
"cwd": "${workspaceFolder}",
"port": 9224,
"protocol": "inspector",
"request": "attach",
"sourceMaps": true,
"type": "node",
"timeout": 1000000
},
], ],
"compounds": [ "compounds": [
{ {

View File

@ -197,7 +197,9 @@ export default connections => {
} }
// Init exporter process // Init exporter process
exporter = fork(isDevelopment ? './dist/exporter.js' : path.resolve(__dirname, './exporter.js')); exporter = fork(isDevelopment ? './dist/exporter.js' : path.resolve(__dirname, './exporter.js'), [], {
execArgv: isDevelopment ? ['--inspect=9224'] : undefined
});
exporter.send({ exporter.send({
type: 'init', type: 'init',
client: { client: {
@ -269,7 +271,9 @@ export default connections => {
const dbConfig = await connections[options.uid].getDbConfig(); const dbConfig = await connections[options.uid].getDbConfig();
// Init importer process // Init importer process
importer = fork(isDevelopment ? './dist/importer.js' : path.resolve(__dirname, './importer.js')); importer = fork(isDevelopment ? './dist/importer.js' : path.resolve(__dirname, './importer.js'), [], {
execArgv: isDevelopment ? ['--inspect=9224'] : undefined
});
importer.send({ importer.send({
type: 'init', type: 'init',
dbConfig, dbConfig,