gm
gm copied to clipboard
Need a way to abort a long running write operation
gm.subClass({ imageMagick: true })(inputPath).resize(1024, 1024).write(path, err => {
if (err) {
console.log(err);
} else {
console.log('success');
}
});
If this is a microservice handling a request and the request times out, there is no way to stop the underlying imagemagick process. It keep on going and taking up resources. There is an undocumented timeout option, but would much prefer to be able to shutdown on an external event. Perhaps expose the underlying _spawn.