Skip to content

Commit

Permalink
Wait for team histories to save before continuing through saveHistory
Browse files Browse the repository at this point in the history
Currently we're seeing a number of errors in `saveHistory` that appear to be timeouts. We believe not waiting for the async `saveTeamHistory` function to complete may be resulting in an early termination of the container these functions are supposed to be running in.
  • Loading branch information
sweinstein22 authored Apr 30, 2021
1 parent 305e6a3 commit 8f4ca00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/src/saveHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const saveHistory = functions.pubsub
const teamId = teamDocSnapshot.id;
const teamDoc = db.collection('teams').doc(teamId);

saveTeamHistory(timestamp, teamId, teamDoc);
await saveTeamHistory(timestamp, teamId, teamDoc);
}
});

Expand Down

0 comments on commit 8f4ca00

Please sign in to comment.