]>
Commit | Line | Data |
---|---|---|
56c778b4 NL |
1 | Install RabbitMQ for asynchronous tasks |
2 | ======================================= | |
3 | ||
03e078d0 | 4 | In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ. |
56c778b4 NL |
5 | |
6 | Requirements | |
7 | ------------ | |
8 | ||
9 | You need to have RabbitMQ installed on your server. | |
10 | ||
11 | Installation | |
12 | ~~~~~~~~~~~~ | |
13 | ||
14 | .. code:: bash | |
15 | ||
16 | wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
17 | apt-key add rabbitmq-signing-key-public.asc | |
18 | apt-get update | |
19 | apt-get install rabbitmq-server | |
20 | ||
21 | Configuration and launch | |
22 | ~~~~~~~~~~~~~~~~~~~~~~~~ | |
23 | ||
24 | .. code:: bash | |
25 | ||
26 | rabbitmq-plugins enable rabbitmq_management # (useful to have a web interface, available at http://localhost:15672/ (guest/guest) | |
27 | rabbitmq-server -detached | |
28 | ||
29 | Stop RabbitMQ | |
30 | ~~~~~~~~~~~~~ | |
31 | ||
32 | .. code:: bash | |
33 | ||
34 | rabbitmqctl stop | |
35 | ||
36 | ||
37 | Configure RabbitMQ in wallabag | |
38 | ------------------------------ | |
39 | ||
37da1786 | 40 | Edit your ``app/config/parameters.yml`` file to edit RabbitMQ configuration. The default one should be ok: |
03e078d0 JB |
41 | |
42 | .. code:: yaml | |
43 | ||
44 | rabbitmq_host: localhost | |
45 | rabbitmq_port: 5672 | |
46 | rabbitmq_user: guest | |
47 | rabbitmq_password: guest | |
48 | ||
fa4c39b3 NL |
49 | Enable RabbitMQ in wallabag |
50 | --------------------------- | |
51 | ||
52 | In internal settings, in the **Import** section, enable RabbitMQ (with the value 1). | |
56c778b4 NL |
53 | |
54 | Launch RabbitMQ consumer | |
55 | ------------------------ | |
56 | ||
03e078d0 | 57 | Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job: |
56c778b4 NL |
58 | |
59 | .. code:: bash | |
60 | ||
03e078d0 | 61 | # for Pocket import |
ba692168 | 62 | bin/console rabbitmq:consumer -e=prod import_pocket -w |
03e078d0 | 63 | |
2d8af6fc | 64 | # for Readability import |
ba692168 | 65 | bin/console rabbitmq:consumer -e=prod import_readability -w |
03e078d0 | 66 | |
2d8af6fc | 67 | # for Instapaper import |
ba692168 | 68 | bin/console rabbitmq:consumer -e=prod import_instapaper -w |
2d8af6fc | 69 | |
03e078d0 | 70 | # for wallabag v1 import |
ba692168 | 71 | bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w |
03e078d0 JB |
72 | |
73 | # for wallabag v2 import | |
ba692168 | 74 | bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w |
2d8af6fc NL |
75 | |
76 | # for Firefox import | |
ba692168 | 77 | bin/console rabbitmq:consumer -e=prod import_firefox -w |
2d8af6fc NL |
78 | |
79 | # for Chrome import | |
ba692168 | 80 | bin/console rabbitmq:consumer -e=prod import_chrome -w |