Changeset 14518

Show
Ignore:
Timestamp:
01/20/08 18:22:02 (11 months ago)
Author:
rambo
Message:

actually working version of setting the http_timeout

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/fi.hut.staticdumps/bin/dump_redirects.php

    r14197 r14518  
    55$wget_options = "-erobots=off -q -m -nH"; 
    66$rsync_options = '-a'; 
     7$http_timeout = 300; // seconds = 5minutes 
    78 
    89function better_die($msg) 
     
    3435} 
    3536require_once('midcom/lib/org/openpsa/httplib/nonmidcom.php'); 
    36 // NOTE: This way of forcing config only works with the nonmidcom mode of httplib, do not think you could use this elsewhere ! 
    37 $GLOBALS['midcom_component_data']['org.openpsa.httplib']['config']->options['http_timeout'] = 300; 
    3837 
    3938if (   !isset($argv[1]) 
     
    8887        } 
    8988        $client = new org_openpsa_httplib(); 
     89        // This way only works with the nonmidcom.php initialized client 
     90        $client->_config->options['http_timeout'] = $http_timeout; 
    9091        $retries = 5; 
    9192        do 
  • branches/MidCOM_2_8/fi.hut.staticdumps/bin/dump_sites.php

    r14314 r14518  
    55$wget_options = "-erobots=off -q -m -nH"; 
    66$rsync_options = '-a'; 
     7$http_timeout = 300; // seconds = 5minutes 
    78 
    89function better_die($msg) 
     
    3839} 
    3940require_once('midcom/lib/org/openpsa/httplib/nonmidcom.php'); 
    40 // NOTE: This way of forcing config only works with the nonmidcom mode of httplib, do not think you could use this elsewhere ! 
    41 $GLOBALS['midcom_component_data']['org.openpsa.httplib']['config']->options['http_timeout'] = 300; 
    4241 
    4342if (   !isset($argv[1]) 
     
    151150        } 
    152151        $client = new org_openpsa_httplib(); 
     152        $client->_config->options['http_timeout'] = $http_timeout; 
    153153        // Quick and Dirty way to do retries (the result might be empty and still be valid...) 
    154154        $retries = 5; 
     
    203203        } 
    204204        $client = new org_openpsa_httplib(); 
     205        $client->_config->options['http_timeout'] = $http_timeout; 
    205206        // Quick and Dirty way to do retries (the result might be empty and still be valid...) 
    206207        $retries = 5;