Skip to content

Commit 7011246

Browse files
authored
Merge pull request #19 from imqueue/fix-pgiplock-init
Fix pgiplock init
2 parents 11f1d98 + 732e47a commit 7011246

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/PgIpLock.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,12 @@ export class PgIpLock implements AnyLock {
113113
*/
114114
public async init(): Promise<void> {
115115
if (!await this.schemaExists()) {
116-
await this.createSchema();
117-
await Promise.all([this.createLock(), this.createDeadlockCheck()]);
116+
try {
117+
await this.createSchema();
118+
await Promise.all([this.createLock(), this.createDeadlockCheck()]);
119+
} catch (e) {
120+
/*ignore*/
121+
}
118122
}
119123

120124
if (this.notifyHandler && !this.uniqueKey) {

0 commit comments

Comments
 (0)