Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ or if you want to use it with [Redis]
$ pipenv install 'remoulade[redis]'
```

or if you want to use it with [PostgreSQL]

```console
$ pipenv install 'remoulade[postgres]'
```

## Quickstart

1. Make sure you've got [RabbitMQ] running, then create a new file called
Expand Down Expand Up @@ -109,4 +115,5 @@ remoulade is licensed under the LGPL. Please see [COPYING] and
[COPYING]: https://github.com/wiremind/remoulade/blob/master/COPYING
[RabbitMQ]: https://www.rabbitmq.com/
[Redis]: https://redis.io
[PostgreSQL]: https://www.postgresql.org/
[user guide]: https://remoulade.readthedocs.io/en/latest/guide.html
1 change: 1 addition & 0 deletions docs/source/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@
.. _gevent: http://www.gevent.org/
.. _RabbitMQ: https://www.rabbitmq.com
.. _Redis: https://redis.io
.. _PostgreSQL: https://www.postgresql.org
.. _Dramatiq: https://dramatiq.io
22 changes: 21 additions & 1 deletion docs/source/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Message Brokers
---------------

Remoulade abstracts over the notion of a message broker and currently
supports RabbitMQ out of the box.
supports RabbitMQ and PostgreSQL out of the box.

RabbitMQ Broker
^^^^^^^^^^^^^^^
Expand All @@ -398,6 +398,26 @@ execution::
remoulade.set_broker(rabbitmq_broker)


PostgreSQL Broker
^^^^^^^^^^^^^^^^^

To configure the PostgreSQL broker, instantiate a :class:`PostgresBroker
<remoulade.brokers.postgres.PostgresBroker>` and set it as the global
broker as early as possible during your program's execution::

import remoulade

from remoulade.brokers.postgres import PostgresBroker

postgres_broker = PostgresBroker(url="postgresql://remoulade@localhost:5432/remoulade")
remoulade.set_broker(postgres_broker)

PostgresBroker stores messages in list-partitioned tables by queue name.
Acked messages are archived for replay using the ``ack_retention`` setting
(or ``REMOULADE_POSTGRESQL_ACK_RETENTION``) and can be requeued with
``broker.requeue_archived(message_id, queue_name)``.


Local Broker
^^^^^^^^^^^^^^^

Expand Down
4 changes: 4 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ Or if you want to use it with Redis_::

$ pip install -U 'remoulade[redis]'

Or if you want to use it with PostgreSQL_::

$ pip install -U 'remoulade[postgres]'

Read the :doc:`guide` if you're ready to get started.


Expand Down
8 changes: 7 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ To install remoulade, simply run the following command in a terminal::

$ pip install -U 'remoulade[rabbitmq]'

Remoulade use RabbitMQ_ as message broker.
Remoulade supports RabbitMQ_ and PostgreSQL_ as message brokers.

If you would like to use it with Redis_ to store the results then run:

$ pip install -U 'remoulade[rabbitmq, redis]'

If you would like to use it with PostgreSQL_ for the broker or results then run:

$ pip install -U 'remoulade[postgres]'

If you don't have `pip`_ installed, check out `this guide`_.

Extra Requirements
Expand All @@ -33,6 +37,7 @@ Name Description
============= =======================================================================================
``rabbitmq`` Installs the required dependencies for using Remoulade with RabbitMQ.
``redis`` Installs the required dependencies for using Remoulade with Redis.
``postgres`` Installs the required dependencies for PostgreSQL brokers or backends.
============= =======================================================================================

If you want to install Remoulade with all available features, run::
Expand Down Expand Up @@ -67,5 +72,6 @@ in the cloned directory.


.. _GitHub: https://github.com/wiremind/remoulade
.. _PostgreSQL: https://www.postgresql.org/
.. _pip: https://pip.pypa.io/en/stable/
.. _this guide: http://docs.python-guide.org/en/latest/starting/installation/
4 changes: 4 additions & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Brokers
.. autoclass:: remoulade.brokers.rabbitmq.RabbitmqBroker
:members:
:inherited-members:
.. autoclass:: remoulade.brokers.postgres.PostgresBroker
:members:
:inherited-members:
.. autoclass:: remoulade.brokers.stub.StubBroker
:members:
:inherited-members:
Expand Down Expand Up @@ -133,6 +136,7 @@ Backends
^^^^^^^^

.. autoclass:: remoulade.results.ResultBackend
.. autoclass:: remoulade.results.backends.PostgresBackend
.. autoclass:: remoulade.results.backends.RedisBackend
.. autoclass:: remoulade.results.backends.StubBackend

Expand Down
1 change: 1 addition & 0 deletions examples/results/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ retrieve task results.
1. Install remoulade: `pip install remoulade[rabbitmq]`
1. In a separate terminal window, run the workers: `remoulade example`.
1. In another terminal, run `python -m example`.
1. For PostgreSQL, install `pip install remoulade[postgres]` and run `python -m postgres_example`.


[docker]: https://docs.docker.com/engine/install/
Loading