[Bug] constructor with options does not destructure redis property if it is a string
Shinigami92 opened this issue · comments
Description
When passing redis connection as options object but it is a url, the url will not destructed
Lines 85 to 129 in 4d197e8
If not passed as string, the if
in line 90 will be omitted and then it be ignored via line 129 because this takes precedents over string
Minimal, Working Test code to reproduce the issue.
import Queue from 'bull';
new Queue<any>('name', { redis: 'redis://my.host/6379' }); // results in 127.0.0.1 ❌
new Queue<any>('name', 'redis://my.host/6379'); // results in my.host ✅
Bull version
4.11.3
Additional information
This took me around 4h to find out...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please only mark issues and PRs as stale if there are reasons why e.g. they couldn't get reviewed or merged.
This behavior of marking issues as stale is not helping anyone.
🎉 This issue has been resolved in version 4.11.5 🎉
The release is available on:
Your semantic-release bot 📦🚀