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 https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3081). This was fixed in #14, where it depended on the order of events:
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
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 https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3081). This was fixed in #14, where it depended on the order of events:
Number 3 was achieved via the call
defer outFile.Close()
: https://github.com/tagatac/bagoup/blob/86f9b32870d2127f3fd3e196cecfc24265cf8d87/write.go#L29However, #29 removed
Close()
from theOutFile
interface, collapsingStage()
andFlush()
into a single functionFlush()
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