mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 11:36:45 +00:00
fix(script): move speedbump to better avoid tripping concurrency limits
This commit is contained in:
parent
3757480a8d
commit
1c53287700
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,6 @@ async function deleteAmplitudeData (userId, email) {
|
|||
console.log(`${userId} (${email}) Amplitude response: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
}
|
||||
|
||||
async function deleteHabiticaData (user, email) {
|
||||
|
|
@ -97,6 +96,7 @@ async function processEmailAddress (email) {
|
|||
return console.log(`No users found with email address ${email}`);
|
||||
}
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
return Promise.all(users.map(user => (async () => {
|
||||
await deleteAmplitudeData(user._id, email); // eslint-disable-line no-await-in-loop
|
||||
await deleteHabiticaData(user, email); // eslint-disable-line no-await-in-loop
|
||||
|
|
|
|||
Loading…
Reference in a new issue