allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#5105] introduce a new "task" db for monq_task collection
Date Thu, 11 Oct 2012 14:55:54 GMT
Updated Branches:
  refs/heads/db/5105 [created] fbf1157bb


[#5105] introduce a new "task" db for monq_task collection


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/fbf1157b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fbf1157b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fbf1157b

Branch: refs/heads/db/5105
Commit: fbf1157bb0d8d62e3b73f64c77b95702cda53034
Parents: 5d253a0
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Thu Oct 11 14:55:40 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Thu Oct 11 14:55:40 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/monq_model.py |    7 ++++++-
 Allura/development.ini            |    1 +
 Allura/test.ini                   |    1 +
 3 files changed, 8 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fbf1157b/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index 9964fc8..214acbc 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -11,12 +11,17 @@ import ming
 from ming.utils import LazyProperty
 from ming import schema as S
 from ming.orm import session, FieldProperty
+from ming import Session
+from ming.orm.ormsession import ThreadLocalORMSession
 from ming.orm.declarative import MappedClass
 
 from .session import main_orm_session
 
 log = logging.getLogger(__name__)
 
+task_orm_session = ThreadLocalORMSession(Session.by_name('task'))
+
+
 class MonQTask(MappedClass):
     '''Task to be executed by the taskd daemon.
 
@@ -40,7 +45,7 @@ class MonQTask(MappedClass):
     states = ('ready', 'busy', 'error', 'complete')
     result_types = ('keep', 'forget')
     class __mongometa__:
-        session = main_orm_session
+        session = task_orm_session
         name = 'monq_task'
         indexes = [
             [

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fbf1157b/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 0d835b7..4e001c0 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -132,6 +132,7 @@ activitystream.enabled = false
 # Ming setup
 ming.main.uri = mongodb://127.0.0.1:27017/allura
 ming.project.uri = mongodb://127.0.0.1:27017/project-data
+ming.task.uri = mongodb://127.0.0.1:27017/task
 ming.zarkov.uri = mongodb://127.0.0.1:27017/zarkov
 
 # Zarkov host setting, requires the zarkov and gevent libraries.

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fbf1157b/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 6b37100..fa951e2 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -27,6 +27,7 @@ base_url = http://localhost/
 # ming.main.master = mongo://127.0.0.1:27018/allura
 ming.main.uri = mim:///allura
 ming.project.uri = mim:///project-data
+ming.task.uri = mim:///task
 
 # ActivityStream
 activitystream.master = mim://


Mime
View raw message