Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could this be async.each? #116

Open
uplift opened this issue Mar 18, 2022 · 2 comments
Open

Could this be async.each? #116

uplift opened this issue Mar 18, 2022 · 2 comments

Comments

@uplift
Copy link
Contributor

uplift commented Mar 18, 2022

Following on from NodeBB/NodeBB#10410 could this upgrade use async.each instead of async.eachSeries. Is order important in this script? As far as I can tell it isn't but I'm not 100%.

async.eachSeries(values, function (value, next) {
progress.incr();
db.sortedSetAdd((settings.name || 'appId') + ':uid', hashData[value], value, next);
}, next);

@julianlam
Copy link
Owner

Good lord this upgrade script is old.

If you still do need it, then it'd be best to have this one rewritten in async..await, but looking at that code, it should be fine to just change it to async.each.

@uplift
Copy link
Contributor Author

uplift commented Apr 27, 2022

Yeah I ended up rewriting it as async await in the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants