]> git.immae.eu Git - github/wallabag/wallabag.git/blame - docs/en/developer/redis.rst
Added the whole path to parameters.yml file
[github/wallabag/wallabag.git] / docs / en / developer / redis.rst
CommitLineData
03e078d0 1Install Redis for asynchronous tasks
2d8af6fc 2====================================
03e078d0
JB
3
4In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis.
5
6Requirements
7------------
8
9You need to have Redis installed on your server.
10
11Installation
12~~~~~~~~~~~~
13
14.. code:: bash
15
16 apt-get install redis-server
17
18Launch
19~~~~~~
20
21The server might be already running after installing, if not you can launch it using:
22
23.. code:: bash
24
25 redis-server
26
27
28Configure Redis in wallabag
29---------------------------
30
37da1786 31Edit your ``app/config/parameters.yml`` file to edit Redis configuration. The default one should be ok:
03e078d0
JB
32
33.. code:: yaml
34
35 redis_host: localhost
36 redis_port: 6379
37
a25377cb 38Enable Redis in wallabag
fa4c39b3
NL
39------------------------
40
41In internal settings, in the **Import** section, enable Redis (with the value 1).
03e078d0
JB
42
43Launch Redis consumer
2d8af6fc 44---------------------
03e078d0
JB
45
46Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
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
03e078d0 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
03e078d0 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
03e078d0 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
03e078d0
JB
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
03e078d0 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
03e078d0
JB
71If 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 :
72
73.. code:: bash
74
ba692168 75 bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12