Browse Source

Documented using IronMQ as a broker and IronCache as a result store.

Travis 12 năm trước cách đây
mục cha
commit
a5964bdc09

+ 1 - 0
.gitignore

@@ -19,4 +19,5 @@ Documentation/
 .ropeproject/
 .project
 .pydevproject
+.idea/
 

+ 5 - 1
README.rst

@@ -9,7 +9,7 @@
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/celery/celery/
 :Keywords: task queue, job queue, asynchronous, rabbitmq, amqp, redis,
-  python, webhooks, queue, distributed
+  python, webhooks, queue, distributed, ironmq, ironcache
 
 --
 
@@ -128,6 +128,7 @@ It supports...
         - MongoDB_, Beanstalk_,
         - CouchDB_, SQLAlchemy_,
         - Django ORM, Amazon SQS,
+        - IronMQ_
         - and more...
 
     - **Concurrency**
@@ -140,6 +141,7 @@ It supports...
         - memcached, MongoDB
         - SQLAlchemy, Django ORM
         - Apache Cassandra
+        - IronCache_
 
     - **Serialization**
 
@@ -156,6 +158,8 @@ It supports...
 .. _Beanstalk: http://kr.github.com/beanstalkd
 .. _CouchDB: http://couchdb.apache.org
 .. _SQLAlchemy: http://sqlalchemy.org
+.. _IronMQ: http://iron.io/mq
+.. _IronCache: http://iron.io/cache
 
 Framework Integration
 =====================

+ 31 - 0
docs/configuration.rst

@@ -199,6 +199,10 @@ Can be one of the following:
     Use `Cassandra`_ to store the results.
     See :ref:`conf-cassandra-result-backend`.
 
+* ironcache
+    Use `IronCache`_ to store the results.
+    See :ref:`conf-ironcache-result-backend`.
+
 .. warning:
 
     While the AMQP result backend is very efficient, you must make sure
@@ -586,6 +590,33 @@ Example configuration
         'max_retries': 10
     }
 
+
+.. _conf-ironcache-result-backend:
+
+IronCache backend settings
+--------------------------
+
+.. note::
+
+    The Cassandra backend requires the :mod:`iron_celery` library:
+    http://pypi.python.org/pypi/iron_celery
+
+    To install the iron_celery package use `pip` or `easy_install`:
+
+    .. code-block:: bash
+
+        $ pip install iron_celery
+
+IronCache is configured via the URL provided in :setting:`CELERY_RESULT_BACKEND`, for example::
+
+    CELERY_RESULT_BACKEND = 'ironcache://project_id:token@'
+
+Or to change the cache name::
+
+    ironcache:://project_id:token@/awesomecache
+
+For more information, see: https://github.com/iron-io/iron_celery
+
 .. _conf-messaging:
 
 Message Routing

+ 1 - 0
docs/getting-started/brokers/index.rst

@@ -20,3 +20,4 @@ Celery supports several message transport alternatives.
     sqs
     couchdb
     beanstalk
+    ironmq

+ 70 - 0
docs/getting-started/brokers/ironmq.rst

@@ -0,0 +1,70 @@
+.. _broker-ironmq:
+
+==================
+ Using IronMQ
+==================
+
+.. _broker-ironmq-installation:
+
+Installation
+============
+
+For IronMQ support, you'll need the [iron_celery](http://github.com/iron-io/iron_celery) library:
+
+.. code-block:: bash
+
+    $ pip install iron_celery
+
+As well as an [Iron.io account](http://www.iron.io). Sign up for free at [iron.io](http://www.iron.io).
+
+.. _broker-ironmq-configuration:
+
+Configuration
+=============
+
+First, you'll need to import the iron_celery library right after you import Celery, for example::
+
+    from celery import Celery
+    import iron_celery
+
+    celery = Celery('mytasks', broker='ironmq://', backend='ironcache://')
+
+You have to specify IronMQ in the broker URL::
+
+    BROKER_URL = 'ironmq://ABCDEFGHIJKLMNOPQRST:ZYXK7NiynGlTogH8Nj+P9nlE73sq3@'
+
+where the URL format is::
+
+    ironmq://project_id:token@
+
+you must *remember to include the "@" at the end*.
+
+The login credentials can also be set using the environment variables
+:envvar:`IRON_TOKEN` and :envvar:`IRON_PROJECT_ID`, which are set automatically if you use the IronMQ Heroku add-on.
+And in this case the broker url may only be::
+
+    ironmq://
+
+Clouds
+-----
+
+The default cloud/region is ``AWS us-east-1``. You can choose the IronMQ Rackspace cloud by changing the URL to::
+
+    ironmq://project_id:token@mq-rackspace-dfw.iron.io
+
+Results
+======
+
+You can store results in IronCache with the same Iron.io credentials, just set the results URL with the same syntax
+as the broker URL, but changing the start to ``ironcache``::
+
+    ironcache:://project_id:token@
+
+This will default to a cache named "Celery", if you want to change that::
+
+    ironcache:://project_id:token@/awesomecache
+
+More Information
+===============
+
+You can find more information in the [iron_celery README](http://github.com/iron-io/iron_celery).

+ 1 - 0
docs/getting-started/first-steps-with-celery.rst

@@ -102,6 +102,7 @@ to choose from, including
 
 * :ref:`Amazon SQS <broker-sqs>`
 * :ref:`broker-mongodb`
+* :ref:`IronMQ <broker-ironmq>`
 
 See also `Transport Comparison`_.