mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Remove parallel calls to save (#10416)
* remove parallel saves from the code * fix more unit tests * do not save users when sending message in buyGift (saved later) * fix test * reinstall * fix tests * fix tests
This commit is contained in:
@@ -176,7 +176,7 @@ describe('cron middleware', () => {
|
||||
user.lastCron = moment(new Date()).subtract({days: 2});
|
||||
let todo = generateTodo(user);
|
||||
let todoValueBefore = todo.value;
|
||||
await user.save();
|
||||
await Promise.all([todo.save(), user.save()]);
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
cronMiddleware(req, res, (err) => {
|
||||
|
||||
Reference in New Issue
Block a user