timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.13k stars 158 forks source link

Not every connection DSN has auth, specifically not the case on dev boxes. #42

Closed moltar closed 6 years ago

moltar commented 6 years ago

Dies with error:

TypeError: Cannot read property 'split' of null

https://github.com/timgit/pg-boss/blob/c7fa55016e12b95858e4abe0c145e55d832d193e/src/db.js#L33

moltar commented 6 years ago

This too assumes there is a password:

https://github.com/timgit/pg-boss/blob/8b95d111551de62c79c4f3e21b2024fef5079849/src/attorney.js#L113

timgit commented 6 years ago

Thanks!

timgit commented 6 years ago

Included in 2.4.0

niftykins commented 6 years ago

This doesn't appear to be fixed for me when using 3.0.0. My connection string is postgres://localhost/mail and I get the same TypeError: Cannot read property 'split' of null error from the OP.

timgit commented 6 years ago

this is fixed in 3.1. Thanks