Browse Source

No longer supports MongoDB :(

Ask Solem 8 năm trước cách đây
mục cha
commit
ac695d3341

+ 1 - 1
celery/bin/celery.py

@@ -633,7 +633,7 @@ class _RemoteControl(Command):
 class inspect(_RemoteControl):
     """Inspect the worker at runtime.
 
-    Availability: RabbitMQ (AMQP), Redis, and MongoDB transports.
+    Availability: RabbitMQ (AMQP) and Redis transports.
 
     Examples::
 

+ 2 - 57
docs/configuration.rst

@@ -520,10 +520,6 @@ Can be one of the following:
     Use `Memcached`_ to store the results.
     See :ref:`conf-cache-result-backend`.
 
-* ``mongodb``
-    Use `MongoDB`_ to store the results.
-    See :ref:`conf-mongodb-result-backend`.
-
 * ``cassandra``
     Use `Cassandra`_ to store the results.
     See :ref:`conf-cassandra-result-backend`.
@@ -563,7 +559,6 @@ Can be one of the following:
 
 .. _`SQLAlchemy`: http://sqlalchemy.org
 .. _`Memcached`: http://memcached.org
-.. _`MongoDB`: http://mongodb.org
 .. _`Redis`: http://redis.io
 .. _`Cassandra`: http://cassandra.apache.org/
 .. _`Elasticsearch`: https://aws.amazon.com/elasticsearch-service/
@@ -611,9 +606,9 @@ Default is to expire after 1 day.
 .. note::
 
     For the moment this only works with the AMQP, database, cache,
-    Redis and MongoDB backends.
+    and Redis backends.
 
-    When using the database or MongoDB backends, `celery beat` must be
+    When using the database backend, `celery beat` must be
     running for the results to be expired.
 
 .. setting:: result_cache_max
@@ -866,56 +861,6 @@ in seconds (int/float)
 
 Default is 5 seconds.
 
-.. _conf-mongodb-result-backend:
-
-MongoDB backend settings
-------------------------
-
-.. note::
-
-    The MongoDB backend requires the :pypi:`pymongo` library:
-    https://github.com/mongodb/mongo-python-driver/tree/master
-
-.. setting:: mongodb_backend_settings
-
-``mongodb_backend_settings``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This is a dict supporting the following keys:
-
-* ``database``
-    The database name to connect to. Defaults to ``celery``.
-
-* ``taskmeta_collection``
-    The collection name to store task meta data.
-    Defaults to ``celery_taskmeta``.
-
-* ``max_pool_size``
-    Passed as max_pool_size to PyMongo's Connection or MongoClient
-    constructor. It is the maximum number of TCP connections to keep
-    open to MongoDB at a given time. If there are more open connections
-    than max_pool_size, sockets will be closed when they are released.
-    Defaults to 10.
-
-* ``options``
-
-    Additional keyword arguments to pass to the MongoDB connection
-    constructor.  See the :pypi:`pymongo` docs to see a list of arguments
-    supported.
-
-.. _example-mongodb-result-config:
-
-Example configuration
-~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: python
-
-    result_backend = 'mongodb://192.168.1.100:30000/'
-    mongodb_backend_settings = {
-        'database': 'mydb',
-        'taskmeta_collection': 'my_taskmeta_collection',
-    }
-
 .. _conf-cassandra-result-backend:
 
 Cassandra backend settings

+ 1 - 1
docs/faq.rst

@@ -185,7 +185,7 @@ Do I have to use AMQP/RabbitMQ?
 **Answer**: No.
 
 Although using RabbitMQ is recommended you can also use Redis.  There are also
-experimental transports available such as MongoDB, Beanstalk, CouchDB, or using
+experimental transports available such as Beanstalk, CouchDB, or using
 SQL databases. See :ref:`brokers` for more information.
 
 The experimental transports may have reliability problems and

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

@@ -28,7 +28,6 @@ Experimental Transports
 
     sqlalchemy
     django
-    mongodb
     sqs
     couchdb
     beanstalk

+ 0 - 55
docs/getting-started/brokers/mongodb.rst

@@ -1,55 +0,0 @@
-.. _broker-mongodb:
-
-===============
- Using MongoDB
-===============
-
-.. admonition:: Experimental Status
-
-    The MongoDB transport is in need of improvements in many areas and there
-    are several open bugs.  Unfortunately we don't have the resources or funds
-    required to improve the situation, so we're looking for contributors
-    and partners willing to help.
-
-.. _broker-mongodb-installation:
-
-Installation
-============
-
-For the MongoDB support you have to install additional dependencies.
-You can install both Celery and these dependencies in one go using
-the ``celery[mongodb]`` :ref:`bundle <bundles>`:
-
-.. code-block:: console
-
-    $ pip install -U celery[mongodb]
-
-.. _broker-mongodb-configuration:
-
-Configuration
-=============
-
-Configuration is easy, set the transport, and configure the location of
-your MongoDB database:
-
-.. code-block:: python
-
-    broker_url = 'mongodb://localhost:27017/database_name'
-
-Where the URL is in the format of:
-
-.. code-block:: text
-
-    mongodb://userid:password@hostname:port/database_name
-
-The host name will default to ``localhost`` and the port to 27017,
-and so they are optional.  ``userid`` and ``password`` are also optional,
-but needed if your MongoDB server requires authentication.
-
-.. _mongodb-results-configuration:
-
-Results
--------
-
-If you also want to store the state and return values of tasks in MongoDB,
-you should see :ref:`conf-mongodb-result-backend`.

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

@@ -216,7 +216,7 @@ Keeping Results
 If you want to keep track of the tasks' states, Celery needs to store or send
 the states somewhere.  There are several
 built-in result backends to choose from: `SQLAlchemy`_/`Django`_ ORM,
-`Memcached`_, `Redis`_, AMQP (`RabbitMQ`_), and `MongoDB`_ -- or you can define your own.
+`Memcached`_, `Redis`_, AMQP (`RabbitMQ`_), and -- or you can define your own.
 
 .. _`Memcached`: http://memcached.org
 .. _`MongoDB`: http://www.mongodb.org

+ 1 - 1
docs/getting-started/next-steps.rst

@@ -650,7 +650,7 @@ power of AMQP routing, see the :ref:`Routing Guide <guide-routing>`.
 Remote Control
 ==============
 
-If you're using RabbitMQ (AMQP), Redis or MongoDB as the broker then
+If you're using RabbitMQ (AMQP), Redis or Qpid as the broker then
 you can control and inspect the worker at runtime.
 
 For example you can see what tasks the worker is currently working on:

+ 0 - 4
docs/includes/installation.txt

@@ -71,10 +71,6 @@ Transports and Backends
 :``celery[redis]``:
     for using Redis as a message transport or as a result backend.
 
-:``celery[mongodb]``:
-    for using MongoDB as a message transport (*experimental*),
-    or as a result backend (*supported*).
-
 :``celery[sqs]``:
     for using Amazon SQS as a message transport (*experimental*).
 

+ 2 - 3
docs/includes/introduction.txt

@@ -120,8 +120,7 @@ It supports…
 
     - **Message Transports**
 
-        - RabbitMQ_, Redis_,
-        - MongoDB_ (experimental), Amazon SQS (experimental),
+        - RabbitMQ_, Redis_, Amazon SQS
         - CouchDB_ (experimental), SQLAlchemy_ (experimental),
         - Django ORM (experimental), `IronMQ`_
         - and more…
@@ -133,7 +132,7 @@ It supports…
     - **Result Stores**
 
         - AMQP, Redis
-        - memcached, MongoDB
+        - memcached
         - SQLAlchemy, Django ORM
         - Apache Cassandra, IronCache, Elasticsearch
 

+ 1 - 1
docs/userguide/tasks.rst

@@ -846,7 +846,7 @@ Result Backends
 If you want to keep track of tasks or need the return values, then Celery
 must store or send the states somewhere so that they can be retrieved later.
 There are several built-in result backends to choose from: SQLAlchemy/Django ORM,
-Memcached, RabbitMQ/QPid (``rpc``), MongoDB, and Redis -- or you can define your own.
+Memcached, RabbitMQ/QPid (``rpc``), and Redis -- or you can define your own.
 
 No backend works well for every use case.
 You should read about the strengths and weaknesses of each backend, and choose