Ticket 2048: make OMB posting HTTP timeout configurable as $config['omb']['timeout']; defaults to 5 seconds instead of 20-second default in Yadis library

This commit is contained in:
Brion Vibber 2009-12-01 14:38:34 -08:00
parent de13c4838e
commit edb2578e93
2 changed files with 3 additions and 0 deletions

View File

@ -226,4 +226,6 @@ $default =
array('contentlimit' => null), array('contentlimit' => null),
'location' => 'location' =>
array('namespace' => 1), // 1 = geonames, 2 = Yahoo Where on Earth array('namespace' => 1), // 1 = geonames, 2 = Yahoo Where on Earth
'omb' =>
array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates
); );

View File

@ -167,6 +167,7 @@ class StatusNet_OMB_Service_Consumer extends OMB_Service_Consumer {
$this->datastore = omb_oauth_datastore(); $this->datastore = omb_oauth_datastore();
$this->oauth_consumer = omb_oauth_consumer(); $this->oauth_consumer = omb_oauth_consumer();
$this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher(); $this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
$this->fetcher->timeout = intval(common_config('omb', 'timeout'));
} }
} }