sequelize / sequelize-pool

Resource pool implementation. It can be used to throttle expensive resources.
Other
38 stars 17 forks source link

findAll promise warning #13

Closed bohrshaw closed 5 years ago

bohrshaw commented 5 years ago

Same as https://github.com/sequelize/sequelize/issues/10628

sushantdhiman commented 5 years ago

Need some code that can reproduce this issue, most likely you are not using promises correctly

bohrshaw commented 5 years ago

@sushantdhiman When executing a line (pseudo code): model.findAll().then(...).catch(...), I got:

15-08-2019 16:55:43: (node:31429) Warning: a promise was created in a handler at foo.js:97:37 but was not returned from it, see http://goo.gl/rRqMUw
15-08-2019 16:55:43:     at Function.Promise.attempt.Promise.try (/path/to/node_modules/bluebird/js/release/method.js:29:9)
sushantdhiman commented 5 years ago

Again this is something not related to Sequelize or pool, you are not using promises correctly. If you can show some code which can reproduce this issue I will take a look

bohrshaw commented 5 years ago

Thanks. You are right.