Skip to content

Commit

Permalink
fix(move): Increase lock time for moving messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Mar 14, 2024
1 parent 1931d22 commit b7f0aa6
Show file tree
Hide file tree
Showing 4 changed files with 748 additions and 861 deletions.
2 changes: 1 addition & 1 deletion lib/api/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ module.exports = (db, server, messageHandler, userHandler, storageHandler, setti
let lock;

try {
lock = await server.lock.waitAcquireLock(lockKey, 5 * 60 * 1000, 1 * 60 * 1000);
lock = await server.lock.waitAcquireLock(lockKey, 60 * 60 * 1000, 1 * 60 * 1000);
if (!lock.success) {
throw new Error('Failed to get folder write lock');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/on-expunge.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = (server, messageHandler) => (mailbox, update, session, callback
};

let lockKey = ['mbwr', mailboxData._id.toString()].join(':');
server.lock.waitAcquireLock(lockKey, 5 * 60 * 1000, 1 * 60 * 1000, (err, lock) => {
server.lock.waitAcquireLock(lockKey, 60 * 60 * 1000, 1 * 60 * 1000, (err, lock) => {
if (err) {
return callback(err);
}
Expand Down
Loading

0 comments on commit b7f0aa6

Please sign in to comment.