Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -1183,6 +1183,7 @@ |
1184 | 1184 | } |
1185 | 1185 | curl_setopt( $c, CURLOPT_HEADER, true ); |
1186 | 1186 | curl_setopt( $c, CURLOPT_RETURNTRANSFER, true ); |
| 1187 | + curl_setopt( $c, CURLOPT_TIMEOUT, $wgHTTPTimeout ); |
1187 | 1188 | |
1188 | 1189 | $response = curl_exec( $c ); |
1189 | 1190 | |
Index: trunk/extensions/Collection/pdf-server/pdfserver.py |
— | — | @@ -157,7 +157,6 @@ |
158 | 158 | |
159 | 159 | args=[ |
160 | 160 | mwrender_cmd, |
161 | | - '--daemonize', |
162 | 161 | '--logfile', mwrender_logfile, |
163 | 162 | '--error-file', self.get_path(collection_id, self.error_filename), |
164 | 163 | '--status-file', self.get_path(collection_id, self.status_filename), |
— | — | @@ -172,11 +171,9 @@ |
173 | 172 | args.extend(['--template-blacklist', template_blacklist]) |
174 | 173 | |
175 | 174 | try: |
176 | | - rc = subprocess.call(executable=mwrender_cmd, args=args) |
| 175 | + subprocess.Popen(executable=mwrender_cmd, args=args) |
177 | 176 | except OSError, e: |
178 | 177 | raise RuntimeError('Could not execute command %r: %s' % (mwrender_cmd, e)) |
179 | | - if rc != 0: |
180 | | - return self.error_response('command %r failed: rc = %d' % (mwrender_cmd, rc)) |
181 | 178 | |
182 | 179 | return self.json_response({ |
183 | 180 | 'collection_id': collection_id, |
— | — | @@ -246,7 +243,6 @@ |
247 | 244 | |
248 | 245 | args = [ |
249 | 246 | mwzip_cmd, |
250 | | - '--daemonize', |
251 | 247 | '--logfile', mwzip_logfile, |
252 | 248 | '--metabook', metabook_path, |
253 | 249 | '--conf', base_url, |
— | — | @@ -255,11 +251,9 @@ |
256 | 252 | if template_blacklist: |
257 | 253 | args.extend(['--template-blacklist', template_blacklist]) |
258 | 254 | try: |
259 | | - rc = subprocess.call(executable=mwzip_cmd, args=args) |
| 255 | + subprocess.Popen(executable=mwzip_cmd, args=args) |
260 | 256 | except OSError, e: |
261 | 257 | raise RuntimeError('Could not execute command %r: %s' % (mwzip_cmd, e)) |
262 | | - if rc != 0: |
263 | | - return self.error_response('command %r failed: rc = %d' % (mwzip_cmd, rc)) |
264 | 258 | |
265 | 259 | return self.json_response({'state': 'ok'}) |
266 | 260 | |