Merge pull request '5311-serverId_hostname' (!7) from 5311-serverId_hostname into master
gitea/printnatura/pipeline/head This commit looks good Details

Reviewed-on: #7
This commit is contained in:
Guillermo Bonet 2023-03-21 09:19:59 +00:00
commit f4dd20ab1b
3 changed files with 13 additions and 5 deletions

View File

@ -19,7 +19,15 @@ Build
Create file named "config.local.yml" and put your private configuration: 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: db:
host: localhost host: localhost
port: 3306 port: 3306
@ -29,8 +37,7 @@ db:
salix: salix:
url: http://localhost:3000 url: http://localhost:3000
user: user user: user
reconnectTimeout: 30 password: password
refreshRate: 1000
``` ```
## How to use ## How to use

View File

@ -2,7 +2,7 @@ debug: false
log: true log: true
dryPrint: false dryPrint: false
keepFile: false keepFile: false
serverId: 1 serverId: null
concurrency: 4 concurrency: 4
reconnectTimeout: 10 reconnectTimeout: 10
refreshRate: 1000 refreshRate: 1000

View File

@ -5,6 +5,7 @@ const path = require('path');
const colors = require('colors'); const colors = require('colors');
const axios = require('axios'); const axios = require('axios');
const yml = require('require-yml'); const yml = require('require-yml');
const os = require("os");
const selectQuery = fs.readFileSync(`sql/selectQueued.sql`).toString(); const selectQuery = fs.readFileSync(`sql/selectQueued.sql`).toString();
const jobDataQuery = fs.readFileSync(`sql/jobData.sql`).toString(); const jobDataQuery = fs.readFileSync(`sql/jobData.sql`).toString();
@ -172,7 +173,7 @@ class PrintServer {
now(), now(),
null, null,
null, null,
this.conf.serverId, this.conf.serverId || os.hostname,
jobId jobId
]); ]);
this.jobLog(jobId, 'debug', 'get: printing'); this.jobLog(jobId, 'debug', 'get: printing');