allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: [#7862] remove amqp/rabbitmq references, and async.py which could occasionally cause import issues from gitdb looking for another async package
Date Thu, 26 Mar 2015 21:54:31 GMT
Repository: allura
Updated Branches:
  refs/heads/db/7862 [created] 751973e2e


[#7862] remove amqp/rabbitmq references, and async.py which could occasionally cause import
issues from gitdb looking for another async package


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

Branch: refs/heads/db/7862
Commit: 751973e2e9f26bc91f0b70a84d9257b8180145f2
Parents: 1f1a2c5
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Thu Mar 26 21:54:06 2015 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Mar 26 21:54:06 2015 +0000

----------------------------------------------------------------------
 Allura/allura/command/smtp_server.py         |  2 +-
 Allura/allura/command/taskd.py               | 13 +------------
 Allura/allura/lib/app_globals.py             | 20 --------------------
 Allura/allura/model/monq_model.py            |  5 -----
 Allura/allura/tests/test_commands.py         |  1 -
 Allura/development.ini                       | 15 ++-------------
 Allura/docs/getting_started/installation.rst | 23 -----------------------
 Allura/docs/platform/email.rst               |  3 ---
 Allura/docs/platform/platform.rst            |  9 +--------
 9 files changed, 5 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/allura/command/smtp_server.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/smtp_server.py b/Allura/allura/command/smtp_server.py
index eb2a98f..40008d7 100644
--- a/Allura/allura/command/smtp_server.py
+++ b/Allura/allura/command/smtp_server.py
@@ -33,7 +33,7 @@ class SMTPServerCommand(base.Command):
     min_args = 1
     max_args = 1
     usage = '<ini file>'
-    summary = 'Handle incoming emails, routing them to RabbitMQ'
+    summary = 'Handle incoming emails, routing them to taskd'
     parser = command.Command.standard_parser(verbose=True)
     parser.add_option('-c', '--context', dest='context',
                       help=('The context of the message (path to the project'

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/allura/command/taskd.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/taskd.py b/Allura/allura/command/taskd.py
index 40d795a..409e701 100644
--- a/Allura/allura/command/taskd.py
+++ b/Allura/allura/command/taskd.py
@@ -114,12 +114,6 @@ class TaskdCommand(base.Command):
                     'Unexpected http response from taskd request: %s.  Headers: %s',
                     status, headers)
 
-        def waitfunc_amqp():
-            try:
-                return pylons.app_globals.amq_conn.queue.get(timeout=poll_interval)
-            except Queue.Empty:
-                return None
-
         def waitfunc_noq():
             time.sleep(poll_interval)
 
@@ -131,14 +125,9 @@ class TaskdCommand(base.Command):
                     raise StopIteration
             return waitfunc_checks_running
 
-        if pylons.app_globals.amq_conn:
-            waitfunc = waitfunc_amqp
-        else:
-            waitfunc = waitfunc_noq
+        waitfunc = waitfunc_noq
         waitfunc = check_running(waitfunc)
         while self.keep_running:
-            if pylons.app_globals.amq_conn:
-                pylons.app_globals.amq_conn.reset()
             try:
                 while self.keep_running:
                     self.task = M.MonQTask.get(

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index fc49749..30bfbf3 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -61,7 +61,6 @@ from allura.lib import gravatar, plugin, utils
 from allura.lib import helpers as h
 from allura.lib.widgets import analytics
 from allura.lib.security import Credentials
-from allura.lib.async import Connection, MockAMQ
 from allura.lib.solr import MockSOLR, make_solr_from_config
 from allura.lib.zarkov_helpers import ZarkovClient
 
@@ -339,21 +338,6 @@ class Globals(object):
                     return []
             return NullActivityStreamDirector()
 
-    @LazyProperty
-    def amq_conn(self):
-        if asbool(config.get('amqp.enabled', 'true')):
-            if asbool(config.get('amqp.mock')):
-                return MockAMQ(self)
-            else:
-                return Connection(
-                    hostname=config.get('amqp.hostname', 'localhost'),
-                    port=asint(config.get('amqp.port', 5672)),
-                    userid=config.get('amqp.userid', 'testuser'),
-                    password=config.get('amqp.password', 'testpw'),
-                    vhost=config.get('amqp.vhost', 'testvhost'))
-        else:
-            return None
-
     def post_event(self, topic, *args, **kwargs):
         allura.tasks.event_tasks.event.post(topic, *args, **kwargs)
 
@@ -634,7 +618,3 @@ class Icon(object):
     def __init__(self, char, css):
         self.char = char
         self.css = css
-
-
-def connect_amqp(config):
-    return

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index be22769..7f25a4f 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -169,11 +169,6 @@ class MonQTask(MappedClass):
             context=context,
             time_queue=datetime.utcnow() + timedelta(seconds=delay))
         session(obj).flush(obj)
-        try:
-            if g.amq_conn:
-                g.amq_conn.queue.put('')
-        except:
-            log.warning('Error putting to amq_conn', exc_info=True)
         return obj
 
     @classmethod

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/allura/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_commands.py b/Allura/allura/tests/test_commands.py
index 73b419a..1c298c5 100644
--- a/Allura/allura/tests/test_commands.py
+++ b/Allura/allura/tests/test_commands.py
@@ -39,7 +39,6 @@ class EmptyClass(object):
 
 def setUp(self):
     """Method called by nose before running each test"""
-    # setup_basic_test(app_name='main_with_amqp')
     setup_basic_test()
     setup_global_objects()
 

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index ba06cc5..d2ec3aa 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -284,14 +284,8 @@ ming.zarkov.auto_ensure_indexes = False
 
 stats.sample_rate = 1
 
-# Async setup
+; Taskd setup
 monq.poll_interval=2
-amqp.enabled = false
-# amqp.hostname = localhost
-# amqp.port = 5672
-# amqp.userid = testuser
-# amqp.password = testpw
-# amqp.vhost = testvhost
 
 # SOLR setup
 solr.server = http://localhost:8983/solr
@@ -394,7 +388,7 @@ override_root = task ; TurboGears will use controllers/task.py as root
controlle
 # http://docs.python.org/lib/logging-config-fileformat.html
 
 [loggers]
-keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus, timermiddleware, tmw_details
+keys = root, allura, sqlalchemy, paste, pylons, taskdstatus, timermiddleware, tmw_details
 
 [handlers]
 keys = console, stats, taskdstatus, timermiddleware
@@ -425,11 +419,6 @@ level = INFO
 qualname = paste
 handlers =
 
-[logger_amqp]
-level = INFO
-qualname = amqplib
-handlers =
-
 [logger_pylons]
 level = INFO
 qualname = pylons

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/docs/getting_started/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index 3d3321a..9c08692 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -82,26 +82,3 @@ Allura records will be automatically created the first time they log in.
 
 Note: if you want users to register new accounts into your LDAP system via Allura, you should
turn
 off :samp:`autoregister` and turn on :samp:`allow_user_registration`
-
-Enabling RabbitMQ
-^^^^^^^^^^^^^^^^^
-
-For faster notification of background jobs, you can use RabbitMQ.  Assuming a base setup
from the INSTALL, run these commands
-to install rabbitmq and set it up:
-
-.. code-block:: bash
-
-    sudo aptitude install rabbitmq-server
-    sudo rabbitmqctl add_user testuser testpw
-    sudo rabbitmqctl add_vhost testvhost
-    sudo rabbitmqctl set_permissions -p testvhost testuser ""  ".*" ".*"
-    pip install amqplib==0.6.1 kombu==1.0.4
-
-Then edit Allura/development.ini and change `amqp.enabled = false` to `amqp.enabled = true`
and uncomment the other `amqp` settings.
-
-If your `paster taskd` process is still running, restart it:
-
-.. code-block:: bash
-
-    pkill -f taskd
-    nohup paster taskd development.ini > /var/log/allura/taskd.log &
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/docs/platform/email.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/platform/email.rst b/Allura/docs/platform/email.rst
index 754a278..59f5e94 100644
--- a/Allura/docs/platform/email.rst
+++ b/Allura/docs/platform/email.rst
@@ -46,9 +46,6 @@ If you were working with the bug tracker directly on the TurboGears project::
 
     bug.142@turbogears.sf.net
 
-The Allura platform allows you to setup other message types, such as commit
-messages, to go into amqp with the same routing information, and turn into
-"messages" just like e-mail.
 
 Email Content Handling
 ----------------------

http://git-wip-us.apache.org/repos/asf/allura/blob/751973e2/Allura/docs/platform/platform.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/platform/platform.rst b/Allura/docs/platform/platform.rst
index 7e64755..f12299c 100644
--- a/Allura/docs/platform/platform.rst
+++ b/Allura/docs/platform/platform.rst
@@ -40,8 +40,7 @@ complex requirements for data storage and extensibility.  So, we needed
a
 
 We were very impressed by the general message architecture of Roundup, but we
 wanted to extend it from just email messages to include scm commits, and we
-added a message bus (RabbitMQ which we'll talk about in a second), to make
-it fast.
+added a message bus, to make it fast.
 
 .. image:: ../_static/images/messages.png
    :alt: Message Architecture
@@ -74,12 +73,6 @@ Not only that but Rick Copeland had built a couple of custom Object
 and he whipped up Ming, which backed on MongoDB and gave us exactly
 what we needed.
 
-As I mentioned before we also needed a fast, flexible message bus and queuing
-system. RabbitMQ was (lightning) fast, (shockingly) flexible, but not super
-easy to use. Fortunately we didn't have to roll our own wrapper here, as
-the Python community already whipped up Carrot, and Celery, which made
-working with the RabbitMQ based AMQP bus a LOT easer.
-
 
 Application Tools
 -----------------


Mime
View raw message