mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-11 15:45:53 +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]
|
||||
# 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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
3
tasks.js
3
tasks.js
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue