Skip to main content
Version: Next

Task Queue Configuration

VirtFusion uses background tasks to process server actions such as installs, reboots, backups etc...

The default queue system uses the local relational database to store pending tasks where background workers will collect the tasks and process them. On busier systems, it makes sense to use something a little more robust -- Redis.

Redis

Redis Installation

By default, the VirtFusion control server installer has always installed Redis as a requirement. This means Redis should already be up and running.

If you are unsure if Redis is already running, you can check the status on the control server.

systemctl status redis

If Redis is not running, you can enable and start it.

systemctl enable redis
systemctl start redis

Configuring VirtFusion to use Redis

You need to make a simple configuration change to tell VirtFusion to use Redis.

On your control server, edit /opt/virtfusion/app/control/.env and add the following at the bottom.

QUEUE_CONNECTION=redis

Once you have made the change to /opt/virtfusion/app/control/.env you will need to gracefully restart the queue workers. You can do this using the following command.

vfcli-ctrl app:restart --services=queue

Database

info

This is the default driver and you will only need to follow these steps if you would like to revert from using Redis.

On your control server, edit /opt/virtfusion/app/control/.env and add the following at the bottom.

QUEUE_CONNECTION=database

Once you have made the change to /opt/virtfusion/app/control/.env you will need to gracefully restart the queue workers. You can do this using the following command.

vfcli-ctrl app:restart --services=queue