You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/10/16 16:27:08 UTC
[7/16] git commit: [#4927] ticket:185 logging added for task cancel
and requeue
[#4927] ticket:185 logging added for task cancel and requeue
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1e5d6767
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1e5d6767
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1e5d6767
Branch: refs/heads/cj/5094
Commit: 1e5d67675c3e481084551c1d77ee4cc0cc086643
Parents: ac5a58f
Author: Anton Kasyanov <mi...@gmail.com>
Authored: Thu Oct 11 22:20:56 2012 +0300
Committer: Cory Johns <jo...@geek.net>
Committed: Mon Oct 15 20:23:07 2012 +0000
----------------------------------------------------------------------
Allura/allura/tasks/repo_tasks.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1e5d6767/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index a435d66..97c376e 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -89,6 +89,7 @@ def reclone(*args, **kwargs):
@task
def refresh(**kwargs):
from allura import model as M
+ log = logging.getLogger(__name__)
#don't create multiple refresh tasks
q = {
'task_name': 'allura.tasks.repo_tasks.refresh',
@@ -106,6 +107,9 @@ def refresh(**kwargs):
new_commit_ids = c.app.repo.unknown_commit_ids()
if len(new_commit_ids) > 0:
refresh.post()
+ log.info('New refresh task is queued due to new commit(s).')
+ else:
+ log.info('Refresh task is cancelled because another one is ready to start or busy.')
@task
def uninstall(**kwargs):