Skip to content

How to setup Resque Redis for background processing

atd edited this page Mar 5, 2013 · 2 revisions

SocialStream uses Resque for background document processing (audio & video). These files are converted to HTML5 compatible formats, but the processing takes too long to keep the user waiting, so it must be delegated to worker processes

Instaling redis in UNIX

Resque uses the Redis server. It is available as a package for Ubuntu:

sudo apt-get install redis-server

The Resque gem is installed by default when doing bundle update as it's included in social_stream-documents gemspec.

Getting the last ffmpeg version

You also need ffmpeg for video conversion. There is also an Ubuntu package available:

sudo apt-get install ffmpeg

Running resque workers

You must run a task with rake workers:start which creates 3 workers for '*' queue. You can customize it by adding some params rake workers:start COUNT=X QUEUE=Y creating X workers for Y queue.

We must thank Karmi for this wonderful code.