DataBaseLock error with Django, Xapian and Haystack
I'm indexing a model with xapian/haystack. When i test it on my local machine everything works just fine, but when i try to save a model on the server Xapian throws a DatabaseLockError
Exception Type: DatabaseLockError
Exception Location: /opt开发者_Go百科/python2.6/lib/python2.6/site-packages/xapian.py in __init__, line 2886
2886: _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
I read something on the official django haystack site about queuing. Is this the way to go, and if yes how do i implement it?
Seems there is no "instant" solution for this xapian simultaneous write problem. So I'll run an indexing cronjob all 24 hours and fetch the newer stuff with an SQL query, where i fetch only the data set where updated_on >= now - 24h and merge them with the xapian results.
精彩评论