This commit is contained in:
Guillermo Bonet 2022-11-07 10:24:16 +01:00
parent e4276a71cb
commit f45e7c9400
1 changed files with 3 additions and 9 deletions

View File

@ -19,9 +19,9 @@ class PrintServer {
conf = Object.assign({}, conf, yml(localConfFile));
this.conf = conf;
let decoration = '△▽△▽△▽△▽△▽△▽△▽△▽△▽△▽'
console.clear();
console.log(` ░░░▒▒▒▓▓▓███││ │ ${colors.bgCyan.black(' PDF Print Server ')} │ ││███▓▓▓▒▒▒░░░`)
console.log('');
console.log(decoration, `${colors.bgBlack.white.bold(' Print')}${colors.bgBlack.green.bold('Natura ')}`, decoration, '\n')
await this.init();
}
@ -128,7 +128,7 @@ class PrintServer {
await conn.query(updateQuery, ['printed', null, jobId]);
if (conf.debug)
console.debug(`Document has been printed`, jobId, printer);
console.debug(`(${colors.yellow(jobId)}) Document has been printed`, `[${printer}, ${printJob.report}]`.green);
await fs.unlink(tmpFilePath);
} catch (err) {
@ -145,12 +145,6 @@ class PrintServer {
throw new Error(`(${jobId}) ${err.message}`);
}
}
logError() {
console.log('[ERROR]'.red.bold, `(${id}) ${message}:`, param.red);
}
logMessage() {
console.log(' [OK]'.green.bold, `(${id}) ${message}:`, param.green);
}
}
module.exports = PrintServer;