Download & Extend

Limit "number of projects to scan at once" by time?

Project:Localization server
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

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:

<?php
  $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

#1

Unfortunately 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).

#2

Yes, 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.

#3

Status:active» closed (won't fix)

Please don't touch this setting !
Each module has its own time (from 2-3 s up to 200 s or more)...

nobody click here