We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 122db79 commit 700f432Copy full SHA for 700f432
1 file changed
src/utils/db-dump-manager.ts
@@ -158,7 +158,10 @@ export class DBDumpManager {
158
const now = new Date()
159
160
// Check if the lock has expired
161
- if (now.getTime() - lockTimestamp.getTime() > this.LOCK_TIMEOUT_MS) {
+ if (
162
+ now.getTime() - lockTimestamp.getTime() > this.LOCK_TIMEOUT_MS ||
163
+ lockData.processorName === processorName // A past runtime opened this lock.
164
+ ) {
165
console.log(`Removing expired restore lock for processor: ${lockData.processorName}`)
166
await client.query('DELETE FROM "util_cache" WHERE id = $1', [this.LOCK_KEY])
167
} else {
0 commit comments