collective.documentviewer with redis backed celery tasks on Plone 4 and 5
We are long time users of collective.documentviewer as a file viewer in Plone 4. We have it installed, for instance, in Egoibarra.eus and Eibar.eus to show books, magazines, reports and decisions produced in different formats (mainly PDF and MS-Word DOC and DOCX files).
When we first set up the viewer, we installed it using plone.app.async based asynchronous tasks because back then it was the only way to free the main Zope instance threads from doing the document conversion process.
Some weeks ago, we had to install collective.documentviewer in a yet-to-be-published new Plone 5 site and realised that now celery can be used to handle those async tasks. The installation was very easy and we were very satisfied with the results, so we upgraded and migrated the old Plone 4 site to use celery to do the document conversion.
The configuration is very easy, and you can find an example buildout for both Plone 4 and Plone 5 that uses celery to do all the hard work.
- collective.documentviewer with celery and redis on Plone 4
- collective.documentviewer with celery and redis on Plone 5
In both cases you will need to install redis on your server. You can just apt-get install redis-server or run a docker container: docker run -p 6379:6379 -d redis.
The buildout creates a supervisor (started with bin/supervisord) that runs the ZEO server, Plone server and the celery worker).
You may be interested in these other articles
JakiZU! promoting food sustainability
Oct 28, 2024
I have just fixed the examples.
Thanks!