scieloorg/Logger — pull request #24 by fabiobatalha (2013-06-04 21:18:18+00:00)
Title: Implementado com gevent..

Funciona com número pequeno de urls.

Deve ser implementado o uso de gevent.pool para dividir urls de registro de log ao Ratchet em lotes.

Quando um número grande de urls é preparado para ser disparado para o Ratchet o gevent acaba mantendo várias requisições abertas dando o seguinte erro abaixo:

http://200.136.72.14:8870/api/v1/article?code=0100-204X2005000900011&access_date=2011-01-01&journal=0100-204X&issue=0100-204X20050009
Traceback (most recent call last):
File "/Users/fabiobatalha/Trabalho/logger/logger-env/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
File "/Users/fabiobatalha/Trabalho/logger/logger/ratchet.py", line 22, in _request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, in _open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1199, in http_open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1174, in do_open
URLError:
>('http://200.136.72.14:8870/api/v1/article?code=010)> failed with URLError