How about removing the selectbox from admin/l10n_server/l10n_localpacks and replace this with a time based logic? I've re-used the logic that job_queue have implemented in linkchecker and this works great.
Here is an example:
$result = db_query("SELECT * FROM {foo}");
while ($foo = db_fetch_object($result)) {
// Execute time consuming process.
if ((timer_read('page') / 1000) > (ini_get('max_execution_time') / 2)) {
break; // Stop once we have used over half of the maximum execution time.
}
}
Comments
Comment #1
gábor hojtsyUnfortunately whatever we implement would still leave the possibility of dying in the middle of a parsing phase. Even just one parsing phase can go over the execution time limits (we try very hard not to use lots of memory).
Comment #2
hass commentedYes, but if we have N small modules we are able to scan ~10-20 with one cron run in the half of the max execution time. I remember a few people complained in past that the import may takes years to complete... :-)
This is another module that would really benefit from a batch process that works via cron... not sure if someone already works on such a feature. I would really need this to for linkchecker, too.
Comment #3
pvasili commentedPlease don't touch this setting !
Each module has its own time (from 2-3 s up to 200 s or more)...