]>
Commit | Line | Data |
---|---|---|
03e078d0 | 1 | Install Redis for asynchronous tasks |
2d8af6fc | 2 | ==================================== |
03e078d0 JB |
3 | |
4 | In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis. | |
5 | ||
6 | Requirements | |
7 | ------------ | |
8 | ||
9 | You need to have Redis installed on your server. | |
10 | ||
11 | Installation | |
12 | ~~~~~~~~~~~~ | |
13 | ||
14 | .. code:: bash | |
15 | ||
16 | apt-get install redis-server | |
17 | ||
18 | Launch | |
19 | ~~~~~~ | |
20 | ||
21 | The server might be already running after installing, if not you can launch it using: | |
22 | ||
23 | .. code:: bash | |
24 | ||
25 | redis-server | |
26 | ||
27 | ||
28 | Configure Redis in wallabag | |
29 | --------------------------- | |
30 | ||
31 | Edit your ``parameters.yml`` file to edit Redis configuration. The default one should be ok: | |
32 | ||
33 | .. code:: yaml | |
34 | ||
35 | redis_host: localhost | |
36 | redis_port: 6379 | |
37 | ||
38 | ||
39 | Launch Redis consumer | |
2d8af6fc | 40 | --------------------- |
03e078d0 JB |
41 | |
42 | Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job: | |
43 | ||
44 | .. code:: bash | |
45 | ||
46 | # for Pocket import | |
ba692168 | 47 | bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log |
03e078d0 | 48 | |
2d8af6fc | 49 | # for Readability import |
ba692168 | 50 | bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log |
03e078d0 | 51 | |
2d8af6fc | 52 | # for Instapaper import |
ba692168 | 53 | bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log |
2d8af6fc | 54 | |
03e078d0 | 55 | # for wallabag v1 import |
ba692168 | 56 | bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log |
03e078d0 JB |
57 | |
58 | # for wallabag v2 import | |
ba692168 | 59 | bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log |
03e078d0 | 60 | |
2d8af6fc | 61 | # for Firefox import |
ba692168 | 62 | bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log |
2d8af6fc NL |
63 | |
64 | # for Chrome import | |
ba692168 | 65 | bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log |
2d8af6fc | 66 | |
03e078d0 JB |
67 | If you want to launch the import only for some messages and not all, you can specify this number (here 12) and the worker will stop right after the 12th message : |
68 | ||
69 | .. code:: bash | |
70 | ||
ba692168 | 71 | bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12 |