comparison rhodecode/lib/utils.py @ 1366:9c0f5d558789 beta

fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached to db repository instance, and then fetched from cache. Also made all current test work.
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 07 Jun 2011 17:58:51 +0200
parents 87ca17540603
children 069ee86e85ad
comparison
equal deleted inserted replaced
1365:cd865113423e 1366:9c0f5d558789
470 index_location = os.path.join(repo_location, 'index') 470 index_location = os.path.join(repo_location, 'index')
471 if os.path.exists(index_location): 471 if os.path.exists(index_location):
472 shutil.rmtree(index_location) 472 shutil.rmtree(index_location)
473 473
474 try: 474 try:
475 l = DaemonLock(file=jn(dn(dn(index_location)), 'make_index.lock')) 475 l = DaemonLock(file=jn(dn(index_location), 'make_index.lock'))
476 WhooshIndexingDaemon(index_location=index_location, 476 WhooshIndexingDaemon(index_location=index_location,
477 repo_location=repo_location)\ 477 repo_location=repo_location)\
478 .run(full_index=full_index) 478 .run(full_index=full_index)
479 l.release() 479 l.release()
480 except LockHeld: 480 except LockHeld: