aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/en/developer
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 20:43:16 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 22:15:31 +0200
commit03e078d060db410fe56b978cdf45d8eec5e177cb (patch)
tree8875cd6eb72a05545e430918d3360312ffe8c7b1 /docs/en/developer
parent015c7a8359c950f9621b38b11c3973860a981da8 (diff)
downloadwallabag-03e078d060db410fe56b978cdf45d8eec5e177cb.tar.gz
wallabag-03e078d060db410fe56b978cdf45d8eec5e177cb.tar.zst
wallabag-03e078d060db410fe56b978cdf45d8eec5e177cb.zip
Update docs about worker
Diffstat (limited to 'docs/en/developer')
-rw-r--r--docs/en/developer/rabbitmq.rst26
-rw-r--r--docs/en/developer/redis.rst62
2 files changed, 84 insertions, 4 deletions
diff --git a/docs/en/developer/rabbitmq.rst b/docs/en/developer/rabbitmq.rst
index a17e6e4d..8cee45fb 100644
--- a/docs/en/developer/rabbitmq.rst
+++ b/docs/en/developer/rabbitmq.rst
@@ -1,7 +1,7 @@
1Install RabbitMQ for asynchronous tasks 1Install RabbitMQ for asynchronous tasks
2======================================= 2=======================================
3 3
4In order to launch asynchronous tasks (useful for huge imports for example), we use RabbitMQ. 4In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ.
5 5
6Requirements 6Requirements
7------------ 7------------
@@ -37,13 +37,31 @@ Stop RabbitMQ
37Configure RabbitMQ in wallabag 37Configure RabbitMQ in wallabag
38------------------------------ 38------------------------------
39 39
40Edit your ``parameters.yml`` file to edit RabbitMQ configuration. 40Edit your ``parameters.yml`` file to edit RabbitMQ configuration. The default one should be ok:
41
42.. code:: yaml
43
44 rabbitmq_host: localhost
45 rabbitmq_port: 5672
46 rabbitmq_user: guest
47 rabbitmq_password: guest
48
41 49
42Launch RabbitMQ consumer 50Launch RabbitMQ consumer
43------------------------ 51------------------------
44 52
45Put this command in a cron job: 53Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
46 54
47.. code:: bash 55.. code:: bash
48 56
49 bin/console rabbitmq:consumer entries -w \ No newline at end of file 57 # for Pocket import
58 bin/console rabbitmq:consumer import_pocket -w
59
60 # for Readbility import
61 bin/console rabbitmq:consumer import_readability -w
62
63 # for wallabag v1 import
64 bin/console rabbitmq:consumer import_wallabag_v1 -w
65
66 # for wallabag v2 import
67 bin/console rabbitmq:consumer import_wallabag_v2 -w
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 @@
1Install Redis for asynchronous tasks
2=======================================
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
31Edit 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
39Launch Redis consumer
40------------------------
41
42Depending 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
58If 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