comparison pylons_app/lib/utils.py @ 497:fb0c3af6031b celery

Implemented locking for task, to prevent for running the same tasks, moved out pidlock library. Added dirsize display
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 23 Sep 2010 01:08:33 +0200
parents fefffd6fd5f4
children eda96fb85ba7
comparison
equal deleted inserted replaced
496:47f4c7ff245b 497:fb0c3af6031b
372 def create_test_index(repo_location, full_index): 372 def create_test_index(repo_location, full_index):
373 """Makes default test index 373 """Makes default test index
374 @param repo_location: 374 @param repo_location:
375 @param full_index: 375 @param full_index:
376 """ 376 """
377 from pylons_app.lib.indexers import daemon
378 from pylons_app.lib.indexers.daemon import WhooshIndexingDaemon 377 from pylons_app.lib.indexers.daemon import WhooshIndexingDaemon
379 from pylons_app.lib.indexers.pidlock import DaemonLock, LockHeld 378 from pylons_app.lib.pidlock import DaemonLock, LockHeld
380 from pylons_app.lib.indexers import IDX_LOCATION 379 from pylons_app.lib.indexers import IDX_LOCATION
381 import shutil 380 import shutil
382 381
383 if os.path.exists(IDX_LOCATION): 382 if os.path.exists(IDX_LOCATION):
384 shutil.rmtree(IDX_LOCATION) 383 shutil.rmtree(IDX_LOCATION)