Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tmpile for optimizers #11

Open
gregpriday opened this issue Mar 9, 2021 · 0 comments
Open

Use tmpile for optimizers #11

gregpriday opened this issue Mar 9, 2021 · 0 comments

Comments

@gregpriday
Copy link
Member

gregpriday commented Mar 9, 2021

It would be better to use tmpfile for our temporary file here in the OptimizeHtml job. This means each optimizer would need to deal with a file handle instead.

Optimizers that need a filename, would just use stream_get_meta_data like this: https://stackoverflow.com/a/7690726

And then just closing the file handle at the end will automatically remove it from the filesystem. It all just seems safer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant