]>
Commit | Line | Data |
---|---|---|
00283a3b SF |
1 | Installiere Redis für asynchrone Aufgaben |
2 | ========================================= | |
3 | ||
4 | Um asynchrone Aufgaben zu starten (nützlich z.B. für große Imports), können wir Redis nutzen. | |
5 | ||
6 | Voraussetzungen | |
2d8af6fc | 7 | --------------- |
00283a3b SF |
8 | |
9 | Du musst Redis auf deinem Server installiert haben. | |
10 | ||
11 | Installation | |
12 | ~~~~~~~~~~~~ | |
13 | ||
14 | .. code:: bash | |
15 | ||
16 | apt-get install redis-server | |
17 | ||
18 | Starten | |
19 | ~~~~~~ | |
20 | ||
21 | Der Redis Service läuft eventuell schon direkt nach der Installation. Falls nicht kannst du ihn wie folgt starten: | |
22 | ||
23 | .. code:: bash | |
24 | ||
25 | redis-server | |
26 | ||
27 | ||
28 | Konfigure Redis in wallabag | |
29 | --------------------------- | |
30 | ||
31 | Bearbeite die Datei ``parameters.yml``, um die RabbitMQ Konfiguration einzurichten. Die Standardkonfiguration sollte ok sein: | |
32 | ||
33 | .. code:: yaml | |
34 | ||
35 | redis_host: localhost | |
36 | redis_port: 6379 | |
37 | ||
fa4c39b3 NL |
38 | Enable Redis in wallabag |
39 | ------------------------ | |
40 | ||
41 | In internal settings, in the **Import** section, enable Redis (with the value 1). | |
00283a3b SF |
42 | |
43 | Starte den Redis Consumer | |
2d8af6fc | 44 | ------------------------- |
00283a3b SF |
45 | |
46 | Abhängig von welchem Service du importieren möchtest, solltest du einen Cron Job aktivieren (oder mehrere, wenn du viele unterstützen willst): | |
47 | ||
48 | .. code:: bash | |
49 | ||
50 | # for Pocket import | |
ba692168 | 51 | bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log |
00283a3b | 52 | |
2d8af6fc | 53 | # for Readability import |
ba692168 | 54 | bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log |
00283a3b | 55 | |
2d8af6fc | 56 | # for Instapaper import |
ba692168 | 57 | bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log |
2d8af6fc | 58 | |
00283a3b | 59 | # for wallabag v1 import |
ba692168 | 60 | bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log |
00283a3b SF |
61 | |
62 | # for wallabag v2 import | |
ba692168 | 63 | bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log |
00283a3b | 64 | |
2d8af6fc | 65 | # for Firefox import |
ba692168 | 66 | bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log |
2d8af6fc NL |
67 | |
68 | # for Chrome import | |
ba692168 | 69 | bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log |
2d8af6fc | 70 | |
00283a3b SF |
71 | Wenn du den Import nur für ein paar Nachrichten und nicht für alle starten willst, kannst du die Nummer (im folgenden Beispiel 12) angeben. Der Redis Worker wird dann nach der 12. Nachricht stoppen: |
72 | ||
73 | .. code:: bash | |
74 | ||
ba692168 | 75 | bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12 |