julianlam / nodebb-plugin-session-sharing

Allows login sessions from your app to persist in NodeBB
MIT License
86 stars 66 forks source link

Could this be async.each? #116

Open uplift opened 2 years ago

uplift commented 2 years ago

Following on from https://github.com/NodeBB/NodeBB/issues/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%.

https://github.com/julianlam/nodebb-plugin-session-sharing/blob/dacbc752b22bf00b7343d060c1a11b4137d69296/upgrades/session_sharing_hash_to_zset.js#L51-L54

julianlam commented 2 years ago

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 commented 2 years ago

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