From cc5c650c5f6f465a43fac5ff212f6297ebb0deea Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 27 Feb 2023 10:49:21 +0100 Subject: [PATCH 1/3] refs #5311 Now put hostname in serverId --- config.yml | 1 - print-server.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.yml b/config.yml index 6e63ea6..07c5c60 100644 --- a/config.yml +++ b/config.yml @@ -2,7 +2,6 @@ debug: false log: true dryPrint: false keepFile: false -serverId: 1 concurrency: 4 reconnectTimeout: 10 refreshRate: 1000 diff --git a/print-server.js b/print-server.js index a452bcf..8e2be01 100644 --- a/print-server.js +++ b/print-server.js @@ -5,6 +5,7 @@ const path = require('path'); const colors = require('colors'); const axios = require('axios'); const yml = require('require-yml'); +const os = require("os"); const selectQuery = fs.readFileSync(`sql/selectQueued.sql`).toString(); const jobDataQuery = fs.readFileSync(`sql/jobData.sql`).toString(); @@ -172,7 +173,7 @@ class PrintServer { now(), null, null, - this.conf.serverId, + os.hostname, jobId ]); this.jobLog(jobId, 'debug', 'get: printing'); -- 2.40.1 From 4de83b19ce77b7ed1582a5324ddc60625794ef1c Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 6 Mar 2023 20:49:23 +0100 Subject: [PATCH 2/3] refs #5311 If not has serverId put hostname --- print-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print-server.js b/print-server.js index 8e2be01..27a6712 100644 --- a/print-server.js +++ b/print-server.js @@ -173,7 +173,7 @@ class PrintServer { now(), null, null, - os.hostname, + this.conf.serverId || os.hostname, jobId ]); this.jobLog(jobId, 'debug', 'get: printing'); -- 2.40.1 From eea122610b3e9914a791cfabdb841638244f93f6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 8 Mar 2023 18:43:32 +0100 Subject: [PATCH 3/3] refs #5311 serverId: null --- README.md | 13 ++++++++++--- config.yml | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f7df4ce..ba7b077 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,15 @@ Build Create file named "config.local.yml" and put your private configuration: ``` -debug: true +debug: false +log: true +dryPrint: false +keepFile: false +serverId: null +concurrency: 4 +reconnectTimeout: 10 +refreshRate: 1000 +tmpDir: /dev/shm/printnatura db: host: localhost port: 3306 @@ -29,8 +37,7 @@ db: salix: url: http://localhost:3000 user: user -reconnectTimeout: 30 -refreshRate: 1000 + password: password ``` ## How to use diff --git a/config.yml b/config.yml index 07c5c60..31c230b 100644 --- a/config.yml +++ b/config.yml @@ -2,6 +2,7 @@ debug: false log: true dryPrint: false keepFile: false +serverId: null concurrency: 4 reconnectTimeout: 10 refreshRate: 1000 -- 2.40.1