4 In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ or Redis.
6 Install RabbitMQ for asynchronous tasks
7 ---------------------------------------
12 You need to have RabbitMQ installed on your server.
19 wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
20 apt-key add rabbitmq-signing-key-public.asc
22 apt-get install rabbitmq-server
24 Configuration and launch
25 ^^^^^^^^^^^^^^^^^^^^^^^^
29 rabbitmq-plugins enable rabbitmq_management # (useful to have a web interface, available at http://localhost:15672/ (guest/guest)
30 rabbitmq-server -detached
40 Configure RabbitMQ in wallabag
41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 Edit your ``app/config/parameters.yml`` file to edit RabbitMQ configuration. The default one should be ok:
47 rabbitmq_host: localhost
50 rabbitmq_password: guest
52 Enable RabbitMQ in wallabag
53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
55 In internal settings, in the **Import** section, enable RabbitMQ (with the value 1).
57 Launch RabbitMQ consumer
58 ^^^^^^^^^^^^^^^^^^^^^^^^
60 Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
65 bin/console rabbitmq:consumer -e=prod import_pocket -w
67 # for Readability import
68 bin/console rabbitmq:consumer -e=prod import_readability -w
70 # for Instapaper import
71 bin/console rabbitmq:consumer -e=prod import_instapaper -w
73 # for wallabag v1 import
74 bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w
76 # for wallabag v2 import
77 bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w
80 bin/console rabbitmq:consumer -e=prod import_firefox -w
83 bin/console rabbitmq:consumer -e=prod import_chrome -w
85 Install Redis for asynchronous tasks
86 ------------------------------------
88 In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis.
93 You need to have Redis installed on your server.
100 apt-get install redis-server
105 The server might be already running after installing, if not you can launch it using:
112 Configure Redis in wallabag
113 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
115 Edit your ``app/config/parameters.yml`` file to edit Redis configuration. The default one should be ok:
119 redis_host: localhost
122 Enable Redis in wallabag
123 ^^^^^^^^^^^^^^^^^^^^^^^^
125 In internal settings, in the **Import** section, enable Redis (with the value 1).
127 Launch Redis consumer
128 ^^^^^^^^^^^^^^^^^^^^^
130 Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
135 bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log
137 # for Readability import
138 bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log
140 # for Instapaper import
141 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log
143 # for wallabag v1 import
144 bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log
146 # for wallabag v2 import
147 bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log
150 bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log
153 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log
155 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 :
159 bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12