You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/09/19 20:43:27 UTC
[23/50] git commit: [#4940] Simplied taskd only / exclude query and
made only take precedence
[#4940] Simplied taskd only / exclude query and made only take precedence
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7ab3d6b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7ab3d6b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7ab3d6b6
Branch: refs/heads/master
Commit: 7ab3d6b67ae05d702eaccd991204c036d64c3401
Parents: 7f4ce46
Author: Cory Johns <jo...@geek.net>
Authored: Fri Sep 14 18:54:11 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Fri Sep 14 18:54:11 2012 +0000
----------------------------------------------------------------------
Allura/allura/model/monq_model.py | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ab3d6b6/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index 94fe9a1..d22d65e 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -159,14 +159,10 @@ class MonQTask(MappedClass):
while True:
try:
query = dict(state=state)
+ if exclude:
+ query['task_name'] = {'$nin': exclude}
if only:
query['task_name'] = {'$in': only}
- if exclude:
- nin = {'$nin': exclude}
- if 'task_name' not in query:
- query['task_name'] = nin
- else:
- query['task_name'] = {'$and': [query['task_name'], nin]}
obj = cls.query.find_and_modify(
query=query,
update={