incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [7/16] git commit: [#4927] ticket:185 logging added for task cancel and requeue
Date Tue, 16 Oct 2012 14:27:08 GMT
[#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 <mind1master@gmail.com>
Authored: Thu Oct 11 22:20:56 2012 +0300
Committer: Cory Johns <johnsca@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):


Mime
View raw message