]>
Commit | Line | Data |
---|---|---|
080cb52f SF |
1 | Installiere RabbitMQ für asynchrone Aufgaben |
2 | ============================================ | |
3 | ||
4 | Um asynchrone Aufgaben zu starten (nützlich z.B. für große Imports), können wir RabbitMQ nutzen. | |
5 | ||
6 | Voraussetzungen | |
2d8af6fc | 7 | --------------- |
080cb52f SF |
8 | |
9 | Du musst RabbitMQ auf deinem Server installiert haben. | |
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 | Konfiguration und Starten | |
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 | RabbitMQ stoppen | |
2d8af6fc | 30 | ~~~~~~~~~~~~~~~ |
080cb52f SF |
31 | |
32 | .. code:: bash | |
33 | ||
34 | rabbitmqctl stop | |
35 | ||
36 | ||
37 | Konfigure RabbitMQ in wallabag | |
38 | ------------------------------ | |
39 | ||
40 | Bearbeite die Datei ``parameters.yml``, um die RabbitMQ Konfiguration einzurichten. Die Standardkonfiguration sollte ok sein: | |
41 | ||
42 | .. code:: yaml | |
43 | ||
44 | rabbitmq_host: localhost | |
45 | rabbitmq_port: 5672 | |
46 | rabbitmq_user: guest | |
47 | rabbitmq_password: guest | |
48 | ||
49 | ||
50 | Starte den RabbitMQ Consumer | |
2d8af6fc | 51 | ---------------------------- |
080cb52f SF |
52 | |
53 | Abhängig von welchem Service du importieren möchtest, solltest du einen Cron Job aktivieren (oder mehrere, wenn du viele unterstützen willst): | |
54 | ||
55 | .. code:: bash | |
56 | ||
57 | # for Pocket import | |
ba692168 | 58 | bin/console rabbitmq:consumer -e=prod import_pocket -w |
080cb52f | 59 | |
2d8af6fc | 60 | # for Readability import |
ba692168 | 61 | bin/console rabbitmq:consumer -e=prod import_readability -w |
080cb52f | 62 | |
2d8af6fc | 63 | # for Instapaper import |
ba692168 | 64 | bin/console rabbitmq:consumer -e=prod import_instapaper -w |
2d8af6fc | 65 | |
080cb52f | 66 | # for wallabag v1 import |
ba692168 | 67 | bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w |
080cb52f SF |
68 | |
69 | # for wallabag v2 import | |
ba692168 | 70 | bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w |
2d8af6fc NL |
71 | |
72 | # for Firefox import | |
ba692168 | 73 | bin/console rabbitmq:consumer -e=prod import_firefox -w |
2d8af6fc NL |
74 | |
75 | # for Chrome import | |
ba692168 | 76 | bin/console rabbitmq:consumer -e=prod import_chrome -w |
2d8af6fc | 77 |