Skip to content

Advanced Usage

Manabu Niseki edited this page Apr 3, 2022 · 2 revisions

It is possible to add/customize:

  • ARQ queues (in addition to the default queue)
  • Deserializer

by updating ARQ_QUEUES and ARQ_DESERIALIZER like the following.

# test.py
from arq_dashboard.core import settings
from arq_dashboard.main import create_app
from arq.connections import RedisSettings


def deserializer(data: bytes):
    # your code goes here
    # convert bytes into Python object
    return python_obj


settings.ARQ_QUEUES["another.queue"] = RedisSettings(host="localhost", port=6379)
settings.ARQ_DESERIALIZER = deserializer

app = create_app()

Then you can start customized app.

uvicorn test:app
Clone this wiki locally