Report processor worker refactored to run under another user (nobody) and have its own mysql credentials.
This commit is contained in:
parent
c3edf42ada
commit
2ac89f3365
13 changed files with 159 additions and 204 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue