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
51 rabbitmq_prefetch_count: 10 # read http://www.rabbitmq.com/consumer-prefetch.html
53 Enable RabbitMQ in wallabag
54 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 In internal settings, in the **Import** section, enable RabbitMQ (with the value 1).
58 Launch RabbitMQ consumer
59 ^^^^^^^^^^^^^^^^^^^^^^^^
61 Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
66 bin/console rabbitmq:consumer -e=prod import_pocket -w
68 # for Readability import
69 bin/console rabbitmq:consumer -e=prod import_readability -w
71 # for Instapaper import
72 bin/console rabbitmq:consumer -e=prod import_instapaper -w
74 # for wallabag v1 import
75 bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w
77 # for wallabag v2 import
78 bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w
81 bin/console rabbitmq:consumer -e=prod import_firefox -w
84 bin/console rabbitmq:consumer -e=prod import_chrome -w
86 Install Redis for asynchronous tasks
87 ------------------------------------
89 In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis.
94 You need to have Redis installed on your server.
101 apt-get install redis-server
106 The server might be already running after installing, if not you can launch it using:
113 Configure Redis in wallabag
114 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116 Edit your ``app/config/parameters.yml`` file to edit Redis configuration. The default one should be ok:
120 redis_host: localhost
123 Enable Redis in wallabag
124 ^^^^^^^^^^^^^^^^^^^^^^^^
126 In internal settings, in the **Import** section, enable Redis (with the value 1).
128 Launch Redis consumer
129 ^^^^^^^^^^^^^^^^^^^^^
131 Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
136 bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log
138 # for Readability import
139 bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log
141 # for Instapaper import
142 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log
144 # for wallabag v1 import
145 bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log
147 # for wallabag v2 import
148 bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log
151 bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log
154 bin/console wallabag:import:redis-worker -e=prod chrome -vv >> /path/to/wallabag/var/logs/redis-chrome.log
156 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 :
160 bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12