In a module I'm using register_cleanup so the client doesn't need to
wait for me to do a bunch of work. It basically does this:
foreach (@images) {
unless (-f $thumb{$_}) {
&create_thumb($_);
$r->register_cleanup(sub {&create_more_sizes($_, ...)});
}
}
create_more_sizes will create various additional sizes to scale down a
large picture.
This seems to work really well unless there is a large set of images,
then the cleanup handler doesn't get all the way through. I don't see
any warnings/errors. (And unfortunately since the thumbnail is
created the next time someone visits create_more_sizes won't get
called unless I do explicit checks, which would cause me to actually
read the images and I was hoping to avoid that)
Anyway I'm not sure if I'm hitting a limit on the amount of time it
is taking or if I'm just registering too many cleanups.
I was thinking of $r->reset_timeout() as the first line of
create_more_size(), but thought I would check with the list first as I
don't fully understand the ramifications.
--
[EMAIL PROTECTED]