[pylucene-dev] Re: threading
Alexandre Fiori
fiorix at gmail.com
Wed Feb 20 06:44:14 PST 2008
Done. It's working.
I forgot to remove mpm-worker... using mpm-prefork everything works fine.
Here's the script:
# coding: utf-8
import lucene, threading
from mod_python import apache
vm = lucene.initVM(lucene.CLASSPATH, maxheap='256m')
vm.attachCurrentThread()
def handler(req):
req.content_type = 'text/plain'
r = lucene.IndexReader.open('/opt/tupi/files/index')
req.write('docs: %d\n' % r.numDocs())
r.close()
return apache.OK
On Wed, Feb 20, 2008 at 10:51 AM, Alexandre Fiori <fiorix at gmail.com> wrote:
>
> Is it already possible to use pylucene-jcc within modpython?
> I tried adding PythonInterpreter main_interpreter to the configuration,
> but after the first request comes in, apache hangs and never answer.
> The weird thing is that I can't see what really happens, because even
> setting loglevel to debug doesn't work.
>
> --
> Ship ahoy! Hast seen the While Whale?
> - Melville's Captain Ahab
--
Ship ahoy! Hast seen the While Whale?
- Melville's Captain Ahab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20080220/4362039b/attachment-0001.htm
More information about the pylucene-dev
mailing list