##// END OF EJS Templates
docs: updated enable celery documentation
marcink -
r2034:7f42b8f2 default
parent child Browse files
Show More
@@ -1,66 +1,69 b''
1
1
2 .. _config-celery:
2 .. _config-celery:
3
3
4 Install Celery
4 Configure Celery
5 --------------
5 ----------------
6
6
7 To improve |RCM| performance you should install Celery_ as it makes
7 To improve |RCM| performance you should configure and enabled Celery_ as it makes
8 asynchronous tasks work efficiently. If you
8 asynchronous tasks work efficiently. Most important it allows sending notification
9 install Celery you also need multi-broker support. The recommended message
9 emails, create repository forks, and import repositories in async way.
10 broker is rabbitmq_. |RCM| works in sync
10
11 mode, but running Celery_ will give you a large speed improvement when
11 If you decide to use Celery you also need a working message queue.
12 managing many big repositories.
12 The recommended message broker is rabbitmq_.
13
14
15 In order to have install and configure Celery, follow these steps:
13
16
14 If you want to run |RCM| with Celery you need to run ``celeryd`` using the
17 1. Install RabbitMQ, see the documentation on the Celery website for
15 ``paster`` command and the message broker.
18 `rabbitmq installation`_.
16 The ``paster`` command is already installed during |RCM| installation.
19 2. Configure Celery in the
17
20 :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
18 To install and configure Celery, use the following steps:
21 Set the following minimal settings, that are set during
22 rabbitmq_ installation::
19
23
20 1. Install Celery and RabbitMQ, see the documentation on the Celery website for
24 broker.host =
21 `Celery installation`_ and `rabbitmq installation`_.
25 broker.vhost =
22 2. Enable Celery in the
26 broker.user =
23 :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
27 broker.password =
24 3. Run the Celery daemon with the ``paster`` command,
25 using the following example
26 ``.rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini``
27
28
28 .. code-block:: ini
29 Full configuration example is below:
30
31 .. code-block:: ini
29
32
30 # Set this section of the ini file to match your Celery installation
33 # Set this section of the ini file to match your Celery installation
31 ####################################
34 ####################################
32 ### CELERY CONFIG ####
35 ### CELERY CONFIG ####
33 ####################################
36 ####################################
34 ## Set to true
37 ## Set to true
35 use_celery = false
38 use_celery = true
36 broker.host = localhost
39 broker.host = localhost
37 broker.vhost = rabbitmqhost
40 broker.vhost = rabbitmqvhost
38 broker.port = 5672
41 broker.port = 5672
39 broker.user = rabbitmq
42 broker.user = rabbitmq
40 broker.password = qweqwe
43 broker.password = secret
41
44
42 celery.imports = rhodecode.lib.celerylib.tasks
45 celery.imports = rhodecode.lib.celerylib.tasks
43
46
44 celery.result.backend = amqp
47 celery.result.backend = amqp
45 celery.result.dburi = amqp://
48 celery.result.dburi = amqp://
46 celery.result.serialier = json
49 celery.result.serialier = json
47
50
48 #celery.send.task.error.emails = true
51 #celery.send.task.error.emails = true
49 #celery.amqp.task.result.expires = 18000
52 #celery.amqp.task.result.expires = 18000
50
53
51 celeryd.concurrency = 2
54 celeryd.concurrency = 2
52 #celeryd.log.file = celeryd.log
55 #celeryd.log.file = celeryd.log
53 celeryd.log.level = debug
56 celeryd.log.level = debug
54 celeryd.max.tasks.per.child = 1
57 celeryd.max.tasks.per.child = 1
55
58
56 ## tasks will never be sent to the queue, but executed locally instead.
59 ## tasks will never be sent to the queue, but executed locally instead.
57 celery.always.eager = false
60 celery.always.eager = false
61
58
62
59 .. code-block:: bash
63 3. Enable celery, and install `celeryd` process script using the `enable-module`::
60
64
61 # Once the above is configured and saved
65 rccontrol enable-module celery {instance-id}
62 # Run celery with the paster command and specify the ini file
66
63 .rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini
64
67
65 .. _python: http://www.python.org/
68 .. _python: http://www.python.org/
66 .. _mercurial: http://mercurial.selenic.com/
69 .. _mercurial: http://mercurial.selenic.com/
@@ -68,4 +71,3 b' 3. Run the Celery daemon with the ``past'
68 .. _rabbitmq: http://www.rabbitmq.com/
71 .. _rabbitmq: http://www.rabbitmq.com/
69 .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html
72 .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html
70 .. _Celery installation: http://docs.celeryproject.org/en/latest/getting-started/introduction.html#bundles
73 .. _Celery installation: http://docs.celeryproject.org/en/latest/getting-started/introduction.html#bundles
71 .. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/
@@ -10,5 +10,5 b' the information in these sections to con'
10
10
11 setup-email
11 setup-email
12 database-string
12 database-string
13 install-celery
13 configure-celery
14 migrate-repos
14 migrate-repos
General Comments 0
You need to be logged in to leave comments. Login now