Feature request: time limit reset.
Posted: 2016-01-31T14:17:51-07:00
This is a feature request to make calls to set the time resource limit be from 'now' rather than it being limit from the time when the first image was processed. i.e. MagickSetResourceLimit(TimeResource, 45); would set the time limit be 45 second from now.
That would be following the model used by PHP's set_time_limit()
The reason I want this is as follows. I have a webserver that uses ImageMagick (through Imagick) to process images. For security and performance reasons, I don't make calls to ImageMagick/Imagick directly from the web-server, but instead have a background task that does the image processing.
Some pseudo-code for the background image processor looks like this:
I want a limit on the maximum time each single image will take to be processed of 45 seconds. However I also want the image processor to stay up an processing images for longer than 45 seconds at a time. If calling `MagickSetResourceLimit(TimeResource, 45);` from within 'run loop' reset the time limit, that would be lovely.
cheers
Dan
Original discussion:
https://github.com/ImageMagick/ImageMag ... -177600827
That would be following the model used by PHP's set_time_limit()
The reason I want this is as follows. I have a webserver that uses ImageMagick (through Imagick) to process images. For security and performance reasons, I don't make calls to ImageMagick/Imagick directly from the web-server, but instead have a background task that does the image processing.
Some pseudo-code for the background image processor looks like this:
Code: Select all
$endTime = now() + 3600;
while (time() < $endTime) {
$imageTask = waitForImageTask();
$imageProcessor->generateImage($imageTask);
}
cheers
Dan
Original discussion:
https://github.com/ImageMagick/ImageMag ... -177600827