mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-11 23:55:50 +08:00
added log for lock error
This commit is contained in:
parent
bb7c25c8e5
commit
c50c5097f0
5 changed files with 7 additions and 9 deletions
|
@ -18,6 +18,6 @@ email = "domainadmin@example.com" # must be valid email address
|
||||||
[agent]
|
[agent]
|
||||||
# If enabled then starts a HTTP server that listens for ACME verification requests
|
# 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
|
# If you have API already listening on port 80 then you don't need this
|
||||||
enabled = true
|
enabled = true
|
||||||
port = 7003 # use 80 in production
|
port = 7003 # use 80 in production
|
||||||
redirect = "https://wildduck.email" # redirect requests unrelated to ACME updates to this URL
|
redirect = "https://wildduck.email" # redirect requests unrelated to ACME updates to this URL
|
||||||
|
|
|
@ -3848,8 +3848,6 @@ components:
|
||||||
- id
|
- id
|
||||||
- action
|
- action
|
||||||
- result
|
- result
|
||||||
- sess
|
|
||||||
- ip
|
|
||||||
- created
|
- created
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -5893,8 +5891,6 @@ components:
|
||||||
- id
|
- id
|
||||||
- action
|
- action
|
||||||
- result
|
- result
|
||||||
- sess
|
|
||||||
- ip
|
|
||||||
- created
|
- created
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -307,6 +307,7 @@ const acquireCert = async (domain, acmeOptions, certificateData, certHandler) =>
|
||||||
try {
|
try {
|
||||||
await releaseLock(lock);
|
await releaseLock(lock);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(lock);
|
||||||
log.error('Lock', 'Failed to release lock for %s: %s', domainOpLockKey, err);
|
log.error('Lock', 'Failed to release lock for %s: %s', domainOpLockKey, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ module.exports = {
|
||||||
AUTHLOG_BUCKET: 6 * 3600 * 1000,
|
AUTHLOG_BUCKET: 6 * 3600 * 1000,
|
||||||
|
|
||||||
// start processing tasks 5 minues after startup
|
// 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
|
// if no tasks were found, wait 5 seconds
|
||||||
TASK_IDLE_INTERVAL: 5 * 1000,
|
TASK_IDLE_INTERVAL: 5 * 1000,
|
||||||
|
|
3
tasks.js
3
tasks.js
|
@ -460,6 +460,7 @@ async function runTasks() {
|
||||||
|
|
||||||
let startTime = Date.now();
|
let startTime = Date.now();
|
||||||
let done = false;
|
let done = false;
|
||||||
|
log.verbose('Tasks', 'Starting task poll loop');
|
||||||
while (!done) {
|
while (!done) {
|
||||||
if (Date.now() - startTime > 3600 * 1000) {
|
if (Date.now() - startTime > 3600 * 1000) {
|
||||||
// Once in a while break the loop, so that pending tasks can be unlocked
|
// Once in a while break the loop, so that pending tasks can be unlocked
|
||||||
|
@ -492,7 +493,7 @@ async function runTasks() {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.error('Tasks', 'Failed to process task queue error=%s', err.message);
|
log.error('Tasks', 'Failed to process task queue error=%s', err.message);
|
||||||
} finally {
|
} finally {
|
||||||
await timer(consts.TASK_STARTUP_INTERVAL);
|
await timer(consts.TASK_IDLE_INTERVAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue