-
Notifications
You must be signed in to change notification settings - Fork 456
Fix config usage in worker_controller - Closes #2216 #2217
Conversation
workers_controller.js
Outdated
'utf8' | ||
); | ||
var AppConfig = require('./helpers/config.js'); | ||
var config = AppConfig(require('./package.json')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass an extra param for false
which will make AppConfig not to parse the command line params here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only three config values, that worker is dependent on configuration.
config.consoleLogLevel
config.fileLogLevel
config.logFileName
If those can be handled by
that will leave no dependency of worker over configuration file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think change the config to send it to child process rather than reading it directly is not that easy since the childProcessOptions are sent async through IPC after starting the process.
In the current state, we need the config file at the initalization
workers_controller.js
Outdated
'utf8' | ||
); | ||
var AppConfig = require('./helpers/config.js'); | ||
var config = AppConfig(require('./package.json')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only three config values, that worker is dependent on configuration.
config.consoleLogLevel
config.fileLogLevel
config.logFileName
If those can be handled by
that will leave no dependency of worker over configuration file.
What was the problem?
worker_controller.js
was using the outdated way of getting the config.How did I fix it?
Use the latest way of getting the config as the
app.js
How to test it?
Observe if the child process is successfully started
Review checklist