There was an error while loading. Please reload this page.
1 parent 329d94a commit c02e084Copy full SHA for c02e084
1 file changed
src/manager.js
@@ -680,9 +680,9 @@ class Manager extends EventEmitter {
680
return options.db
681
}
682
683
- // Custom db objects (without _pgbdb flag) are assumed to be ready
684
- // Only check opened flag for pg-boss managed db instances
685
- assert(!this.db._pgbdb || (this.db._pgbdb && this.db.opened), 'Database connection is not opened')
+ if (this.db._pgbdb) {
+ assert(this.db.opened, 'Database connection is not opened')
+ }
686
687
return this.db
688
0 commit comments