mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
fix(script): move speedbump to better avoid tripping concurrency limits
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user