##// END OF EJS Templates
celerylib: fixed broken tasks for auto-update
super-admin -
r4735:fd8f99cd stable
parent child Browse files
Show More
@@ -43,6 +43,9 b' class ResultWrapper(object):'
43
43
44 def run_task(task, *args, **kwargs):
44 def run_task(task, *args, **kwargs):
45 log.debug('Got task `%s` for execution', task)
45 log.debug('Got task `%s` for execution', task)
46 if task is None:
47 raise ValueError('Got non-existing task for execution')
48
46 if rhodecode.CELERY_ENABLED:
49 if rhodecode.CELERY_ENABLED:
47 celery_is_up = False
50 celery_is_up = False
48 try:
51 try:
@@ -386,9 +386,7 b' def beat_check(*args, **kwargs):'
386 return time.time()
386 return time.time()
387
387
388
388
389 @async_task(ignore_result=True)
389 def sync_last_update_for_objects(*args, **kwargs):
390 def sync_last_update(*args, **kwargs):
391
392 skip_repos = kwargs.get('skip_repos')
390 skip_repos = kwargs.get('skip_repos')
393 if not skip_repos:
391 if not skip_repos:
394 repos = Repository.query() \
392 repos = Repository.query() \
@@ -405,3 +403,8 b' def sync_last_update(*args, **kwargs):'
405 for root_gr in repo_groups:
403 for root_gr in repo_groups:
406 for repo_gr in reversed(root_gr.recursive_groups()):
404 for repo_gr in reversed(root_gr.recursive_groups()):
407 repo_gr.update_commit_cache()
405 repo_gr.update_commit_cache()
406
407
408 @async_task(ignore_result=True)
409 def sync_last_update(*args, **kwargs):
410 sync_last_update_for_objects(*args, **kwargs)
General Comments 0
You need to be logged in to leave comments. Login now