added log for lock error

This commit is contained in:
Andris Reinman 2021-06-21 14:28:40 +03:00
parent bb7c25c8e5
commit c50c5097f0
5 changed files with 7 additions and 9 deletions

View file

@ -18,6 +18,6 @@ email = "domainadmin@example.com" # must be valid email address
[agent]
# If enabled then starts a HTTP server that listens for ACME verification requests
# If you have API already listening on port 80 then you don't need this
enabled = true
port = 7003 # use 80 in production
redirect = "https://wildduck.email" # redirect requests unrelated to ACME updates to this URL
enabled = true
port = 7003 # use 80 in production
redirect = "https://wildduck.email" # redirect requests unrelated to ACME updates to this URL

View file

@ -3848,8 +3848,6 @@ components:
- id
- action
- result
- sess
- ip
- created
type: object
properties:
@ -5893,8 +5891,6 @@ components:
- id
- action
- result
- sess
- ip
- created
type: object
properties:

View file

@ -307,6 +307,7 @@ const acquireCert = async (domain, acmeOptions, certificateData, certHandler) =>
try {
await releaseLock(lock);
} catch (err) {
console.error(lock);
log.error('Lock', 'Failed to release lock for %s: %s', domainOpLockKey, err);
}
}

View file

@ -77,7 +77,7 @@ module.exports = {
AUTHLOG_BUCKET: 6 * 3600 * 1000,
// start processing tasks 5 minues after startup
TASK_STARTUP_INTERVAL: 5 * 60 * 1000,
TASK_STARTUP_INTERVAL: 1 * 60 * 1000,
// if no tasks were found, wait 5 seconds
TASK_IDLE_INTERVAL: 5 * 1000,

View file

@ -460,6 +460,7 @@ async function runTasks() {
let startTime = Date.now();
let done = false;
log.verbose('Tasks', 'Starting task poll loop');
while (!done) {
if (Date.now() - startTime > 3600 * 1000) {
// Once in a while break the loop, so that pending tasks can be unlocked
@ -492,7 +493,7 @@ async function runTasks() {
} catch (err) {
log.error('Tasks', 'Failed to process task queue error=%s', err.message);
} finally {
await timer(consts.TASK_STARTUP_INTERVAL);
await timer(consts.TASK_IDLE_INTERVAL);
}
}