Report processor worker refactored to run under another user (nobody) and have its own mysql credentials.

This commit is contained in:
root 2017-04-27 16:35:53 -04:00
parent c3edf42ada
commit 2ac89f3365
13 changed files with 159 additions and 204 deletions

View file

@ -12,22 +12,21 @@ function nameToFileName(name) {
}
function getReportDir(report) {
function getReportFileBase(report) {
return path.join(__dirname, '..', 'protected', 'reports', report.id + '-' + nameToFileName(report.name));
}
function getReportContentFile(report) {
return path.join(getReportDir(report), 'report');
return getReportFileBase(report) + '.out';
}
function getReportOutputFile(report) {
return getReportDir(report) + '.output';
return getReportFileBase(report) + '.err';
}
module.exports = {
getReportContentFile,
getReportDir,
getReportOutputFile,
nameToFileName
};