We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8af25ae commit b764f1aCopy full SHA for b764f1a
src/PgIpLock.ts
@@ -112,11 +112,6 @@ export class PgIpLock implements AnyLock {
112
await this.createSchema();
113
await Promise.all([this.createLock(), this.createDeadlockCheck()]);
114
115
- // istanbul ignore if
116
- if (DESTROY_LOCK_ON_START) {
117
- await destroyLock();
118
- }
119
-
120
if (this.notifyHandler) {
121
this.options.pgClient.on('notification', this.notifyHandler);
122
}
@@ -131,6 +126,11 @@ export class PgIpLock implements AnyLock {
131
126
async () => !this.acquired && this.acquire(),
132
127
this.options.acquireInterval,
133
128
));
129
+
130
+ // istanbul ignore if
+ if (DESTROY_LOCK_ON_START) {
+ await destroyLock();
+ }
134
135
136
/**
0 commit comments