Skip to content

Conversation

@celestecote21
Copy link

The createZip function, called for each chunk, is asynchronous. While createZip calls are correctly awaited within Promise.all(), the internal call to fsUtils.zip.write is not awaited. This function is also asynchronous:
https://github.com/TryGhost/migrate/blob/7686d2d3be174fde8ebbc78699aa7b3e7b89d7e4/packages/mg-fs-utils/lib/zip.js#L57

This omission caused the Zipping chunks task to exit prematurely, without waiting the end of zip file creation.
With this fix the comment is not needed and the cleanup task can be re-activated.

The `createZip` function, called for each chunk, is asynchronous. While
`createZip` calls are correctly awaited within `Promise.all()`, the
internal call to `fsUtils.zip.write` is not awaited. This function is
also asynchronous:
https://github.com/TryGhost/migrate/blob/7686d2d3be174fde8ebbc78699aa7b3e7b89d7e4/packages/mg-fs-utils/lib/zip.js#L57

This omission caused the Zipping chunks task to exit prematurely,
without waiting the end of zip file creation.
With this fix the comment is not needed and the cleanup task can be
re-activated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant