Fix a possible race condition in the PaintWeb DML code.
[moodle/mihaisucan.git] / search / cron_php5.php
blob4a0e9f9f2c9f36064cc511790488518c2ed5262a
1 <?php
2 /*
3 * Moodle global search engine
4 * This is a special externalized code for cron handling in PHP5.
5 * Should never be called by a php 4.3.0 implementation.
6 */
8 try{
9 // overrides php limits
10 $maxtimelimit = ini_get('max_execution_time');
11 ini_set('max_execution_time', 300);
12 $maxmemoryamount = ini_get('memory_limit');
13 ini_set('memory_limit', '48M');
15 mtrace("\n--DELETE----");
16 require_once("$CFG->dirroot/search/delete.php");
17 mtrace("--UPDATE----");
18 require_once("$CFG->dirroot/search/update.php");
19 mtrace("--ADD-------");
20 require_once("$CFG->dirroot/search/add.php");
21 mtrace("------------");
22 //mtrace("cron finished.</pre>");
23 mtrace('done');
25 // set back normal values for php limits
26 ini_set('max_execution_time', $maxtimelimit);
27 ini_set('memory_limit', $maxmemoryamount);
29 catch(Exception $ex){
30 mtrace('Fatal exception from Lucene subsystem. Search engine may not have been updated.');
31 mtrace($ex);