-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the open file limit before writing PDFs (#64)
**What is changing**: Check the OS-level open file limit (and adjust it if necessary) prior to writing PDF files. **Why this change is being made**: There is the potential for wkhtmltopdf to need many open files (see wkhtmltopdf/wkhtmltopdf#3081). This was fixed in #14, where it depended on the order of events: 1. Stage the PDF file, getting the number of images 2. Check and adjust the open file limit 3. Flush the PDF file to disk Number 3 was achieved via the call `defer outFile.Close()`: https://github.com/tagatac/bagoup/blob/86f9b32870d2127f3fd3e196cecfc24265cf8d87/write.go#L29 However, #29 removed `Close()` from the `OutFile` interface, collapsing `Stage()` and `Flush()` into a single function `Flush()` run prior to checking and adjusting the open file limit. **Related issue(s)**: Fixes #63 **Follow-up changes needed**: None AFAIK **Is the change completely covered by unit tests? If not, why not?**: Yes
- Loading branch information
Showing
7 changed files
with
184 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.