mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Stop waiting for finalize
Finalize promise will only resolve when the archive is closed. We want to stream as soon as we have the data so this does not suit us. We want to log errors that are thrown due to finalize, these should be propogated by archiver to the response already. GitOrigin-RevId: 4f9d727a00ead1be3caee62e1e0adba069a545c7
This commit is contained in:
parent
d4824b9c5f
commit
d4911ea246
2 changed files with 7 additions and 2 deletions
|
@ -65,7 +65,12 @@ module.exports = {
|
|||
})
|
||||
}
|
||||
|
||||
await archive.finalize()
|
||||
archive.finalize().catch(error => {
|
||||
logger.error(
|
||||
{ error, projectId, userId, build },
|
||||
'error finalizing output files archive'
|
||||
)
|
||||
})
|
||||
|
||||
return archive
|
||||
},
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('OutputFileArchiveManager', function () {
|
|||
|
||||
this.archive = {
|
||||
append: sinon.stub(),
|
||||
finalize: sinon.stub(),
|
||||
finalize: sinon.stub().resolves(),
|
||||
on: sinon.stub(),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue