Skip to content

Commit

Permalink
fix(save-project): try to prevent OOM for large results
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastrajan committed Sep 29, 2022
1 parent cdb0add commit fa149fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tasks/save-project-api.task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ export const saveProjectApiTask: ListrTask = {
return false;
}
},
task: (ctx, task) => api.uploadProject(ctx.processedResults),
task: async (ctx, task) => {
// try to prevent OOM in case of large result
await new Promise<void>((resolve) => setTimeout(() => resolve(), 100));
return api.uploadProject(ctx.processedResults);
},
};

0 comments on commit fa149fc

Please sign in to comment.