diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-09-19 07:15:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 07:15:40 +0200 |
commit | da18a4682f124b02278860d23ac1d59dee995277 (patch) | |
tree | eabbe9da7203eea41e0cb0ec3c26b9b6599cf58f /docs/en/developer/redis.rst | |
parent | 0ed8ce55b5caf2c88e8330afa83abef6c4aac9a4 (diff) | |
parent | 59b97fae996d8307b9d957d210d46200f6d206bf (diff) | |
download | wallabag-da18a4682f124b02278860d23ac1d59dee995277.tar.gz wallabag-da18a4682f124b02278860d23ac1d59dee995277.tar.zst wallabag-da18a4682f124b02278860d23ac1d59dee995277.zip |
Merge pull request #1941 from wallabag/v2-asynchronous-jobs
Use asynchronous jobs for imports
Diffstat (limited to 'docs/en/developer/redis.rst')
-rw-r--r-- | docs/en/developer/redis.rst | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/en/developer/redis.rst b/docs/en/developer/redis.rst new file mode 100644 index 00000000..5748e260 --- /dev/null +++ b/docs/en/developer/redis.rst | |||
@@ -0,0 +1,62 @@ | |||
1 | Install Redis for asynchronous tasks | ||
2 | ======================================= | ||
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 | ||
40 | ------------------------ | ||
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 | ||
47 | bin/console wallabag:import:redis-worker pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log | ||
48 | |||
49 | # for Readbility import | ||
50 | bin/console wallabag:import:redis-worker readability -vv >> /path/to/wallabag/var/logs/redis-readability.log | ||
51 | |||
52 | # for wallabag v1 import | ||
53 | bin/console wallabag:import:redis-worker wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log | ||
54 | |||
55 | # for wallabag v2 import | ||
56 | bin/console wallabag:import:redis-worker wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log | ||
57 | |||
58 | 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 : | ||
59 | |||
60 | .. code:: bash | ||
61 | |||
62 | bin/console wallabag:import:redis-worker pocket -vv --maxIterations=12 | ||