##// END OF EJS Templates
docs: update celery docs
marcink -
r2191:566a87e4 default
parent child Browse files
Show More
@@ -1,73 +1,73 b''
1
1
2 .. _config-celery:
2 .. _config-celery:
3
3
4 Configure Celery
4 Configure Celery
5 ----------------
5 ----------------
6
6
7 To improve |RCM| performance you should configure and enabled Celery_ as it makes
7 To improve |RCM| performance you should configure and enabled Celery_ as it makes
8 asynchronous tasks work efficiently. Most important it allows sending notification
8 asynchronous tasks work efficiently. Most important it allows sending notification
9 emails, create repository forks, and import repositories in async way.
9 emails, create repository forks, and import repositories in async way.
10
10
11 If you decide to use Celery you also need a working message queue.
11 If you decide to use Celery you also need a working message queue.
12 The recommended message broker is rabbitmq_.
12 The recommended message broker is rabbitmq_.
13
13
14
14
15 In order to have install and configure Celery, follow these steps:
15 In order to have install and configure Celery, follow these steps:
16
16
17 1. Install RabbitMQ, see the documentation on the Celery website for
17 1. Install RabbitMQ, see the documentation on the Celery website for
18 `rabbitmq installation`_.
18 `rabbitmq installation`_.
19
19 2. Configure Celery in the
20 2. Configure Celery in the
20 :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
21 :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
21 Set the following minimal settings, that are set during
22 Set the following minimal settings, that are set during rabbitmq_ installation::
22 rabbitmq_ installation::
23
23
24 broker.host =
24 broker.host =
25 broker.vhost =
25 broker.vhost =
26 broker.user =
26 broker.user =
27 broker.password =
27 broker.password =
28
28
29 Full configuration example is below:
29 Full configuration example is below:
30
30
31 .. code-block:: ini
31 .. code-block:: ini
32
32
33 # 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
34 ####################################
34 ####################################
35 ### CELERY CONFIG ####
35 ### CELERY CONFIG ####
36 ####################################
36 ####################################
37 ## Set to true
37 ## Set to true
38 use_celery = true
38 use_celery = true
39 broker.host = localhost
39 broker.host = localhost
40 broker.vhost = rabbitmqvhost
40 broker.vhost = rabbitmqvhost
41 broker.port = 5672
41 broker.port = 5672
42 broker.user = rabbitmq
42 broker.user = rabbitmq
43 broker.password = secret
43 broker.password = secret
44
44
45 celery.imports = rhodecode.lib.celerylib.tasks
45 celery.imports = rhodecode.lib.celerylib.tasks
46
46
47 celery.result.backend = amqp
47 celery.result.backend = amqp
48 celery.result.dburi = amqp://
48 celery.result.dburi = amqp://
49 celery.result.serialier = json
49 celery.result.serialier = json
50
50
51 #celery.send.task.error.emails = true
51 #celery.send.task.error.emails = true
52 #celery.amqp.task.result.expires = 18000
52 #celery.amqp.task.result.expires = 18000
53
53
54 celeryd.concurrency = 2
54 celeryd.concurrency = 2
55 #celeryd.log.file = celeryd.log
55 #celeryd.log.file = celeryd.log
56 celeryd.log.level = debug
56 celeryd.log.level = debug
57 celeryd.max.tasks.per.child = 1
57 celeryd.max.tasks.per.child = 1
58
58
59 ## 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.
60 celery.always.eager = false
60 celery.always.eager = false
61
61
62
62
63 3. Enable celery, and install `celeryd` process script using the `enable-module`::
63 3. Enable celery, and install `celeryd` process script using the `enable-module`::
64
64
65 rccontrol enable-module celery {instance-id}
65 rccontrol enable-module celery {instance-id}
66
66
67
67
68 .. _python: http://www.python.org/
68 .. _python: http://www.python.org/
69 .. _mercurial: http://mercurial.selenic.com/
69 .. _mercurial: http://mercurial.selenic.com/
70 .. _celery: http://celeryproject.org/
70 .. _celery: http://celeryproject.org/
71 .. _rabbitmq: http://www.rabbitmq.com/
71 .. _rabbitmq: http://www.rabbitmq.com/
72 .. _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
73 .. _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
General Comments 0
You need to be logged in to leave comments. Login now