Fixed incomplete GitHub sync (#5310)

- Added await when fetching Github data to prevent the process from
exiting before saving to database

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
Ady Beraud
2024-05-07 09:59:56 +03:00
committed by GitHub
parent 43cd8cc451
commit 3052b49031
2 changed files with 2 additions and 59 deletions

View File

@ -39,8 +39,8 @@ export const fetchAndSaveGithubData = async () => {
[],
)) as Array<IssueNode>;
savePRsToDB(fetchedPRs, assignableUsers);
saveIssuesToDB(fetchedIssues, assignableUsers);
await savePRsToDB(fetchedPRs, assignableUsers);
await saveIssuesToDB(fetchedIssues, assignableUsers);
console.log('data synched!');
};