Mercurial > kallithea
comparison rhodecode/lib/celerylib/__init__.py @ 3055:301268606429 beta
fixes #666 move lockkey path location to cache_dir to ensure this path is always writable for rhodecode server
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 01 Dec 2012 15:17:36 +0100 |
parents | 9d4b80743a2a |
children | a5f0bc867edc d77d9ff149b1 |
comparison
equal
deleted
inserted
replaced
3054:400ca827f2c5 | 3055:301268606429 |
---|---|
91 | 91 |
92 | 92 |
93 def locked_task(func): | 93 def locked_task(func): |
94 def __wrapper(func, *fargs, **fkwargs): | 94 def __wrapper(func, *fargs, **fkwargs): |
95 lockkey = __get_lockkey(func, *fargs, **fkwargs) | 95 lockkey = __get_lockkey(func, *fargs, **fkwargs) |
96 lockkey_path = config['here'] | 96 lockkey_path = config['app_conf']['cache_dir'] |
97 | 97 |
98 log.info('running task with lockkey %s' % lockkey) | 98 log.info('running task with lockkey %s' % lockkey) |
99 try: | 99 try: |
100 l = DaemonLock(file_=jn(lockkey_path, lockkey)) | 100 l = DaemonLock(file_=jn(lockkey_path, lockkey)) |
101 ret = func(*fargs, **fkwargs) | 101 ret = func(*fargs, **fkwargs) |