Closed klappradla closed 6 years ago
@klappradla You are the actual best. Thanks so much for your fix, and the cutest pull request I've ever had. ๐๐ผ
Thanx for your super fast response @sighmon ๐
It would be awesome if you could release a patch version soon, so that our operations people have a calm sleep ๐ and I'm no longer pulling in dependencies straight from Github โ๏ธ
@klappradla 4.0.2 should be available in Rubygems now. :-)
๐ค thanx a ton!
Hi ๐
first of all: thanx a ton for building an maintaining this gem ๐ It's really helpful ๐ค
This PR fixes the check for the
mjml
version to clean up after itself and not leave anode
zombie process lingering around ๐งโโ๏ธscenario
We're using
Sidekiq
to send emails in background jobs and our workers always had some "defunct" node processes lingering around forever - even directly after starting / restarting Sidekiq.problem
This line in
mjml.rb
๐This runs
mjml --version
as a subprocess. But since the IO object is never closed, the process never gets terminated.solution
Looking at the docs for IO#popen, the method can also take a block, like so:
โ๏ธ this will do the exact same as the example above, but also clean up after itself, closing the pipe again. The docs on that:
So I think this is the better fit for the version check: no zombie
node
processes lingering around any more ๐