Skip to main content

arq-http

Dashboard and HTTP api for arq job queue.

Installation

Run with docker

docker run -e REDIS_ADDRESS="<REDIS_ADDRESS>" -p 8000:8000 pieca/arq-http:0.2

Install Python package

# install
TODO

# start rerver
arq-http

Configuration

Configuration is made via environment variables.

variable description
REDIS_ADDRESS redis address, default: redis://localhost:6379
DEFAULT_REFRESH default refresh frequency of dashboards (in seconds), default: 5.0

Refresh frequency can also be controlled by query parameter when opening dashboards:

http://localhost:8000/dashboard/arq:myqueue?refresh=2

Usage

Links

  • dashboards per queue: http://localhost:8000/dashboard/
  • api docs: http://localhost:8000/api/docs

Api

  • list jobs
curl -X GET http://localhost:8000/api/jobs
  • schedule job

Keyword arguments to enqueue_job need to be posted as json data.

Assuming you have a function get_random_numbers:

curl -X POST \
    -d '{"_queue_name": "arq:myqueue", "function": "get_random_numbers", "n": 10}' \
    http://localhost:8000/api/jobs

Screenshots

Dashboard

dashboard

Job listing

job_list

Job details

job_details

local dev

# run valkey
docker run -p 6380:6379 valkey/valkey:8.0.2

# run dashboard
REDIS_ADDRESS="redis://localhost:6380" arq-http

# run example worker
REDIS_ADDRESS="redis://localhost:6380" arq arq_http.worker.WorkerSettings

# create jobs
parallel -I ,, curl -X POST -d \'{\"_queue_name\": \"arq:myqueue\", \"function\": \"get_random_numbers\", \"n\": ,,}\' http://localhost:8000/api/jobs ::: {100000..100100}
parallel -N0 curl -X POST -d \'{\"_queue_name\": \"arq:myqueue\", \"function\": \"random_sleep\"}\' http://localhost:8000/api/jobs ::: {1..10}

# docker build
docker build -t pieca/arq-http:0.2 .

Known limitations

  • to be triggered via http api, jobs cannot take custom classes as arguments
  • dashboard needs to be manually refreshed after running unknown function

TODO:

  • optional disable table generation if too many items
  • push only if new data available
  • better filters based on job status
  • abort endpoint

Metadata

Release files for arq-http 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arq-http 0.2
File Size Uploaded
arq_http-0.2.tar.gz 296.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arq-http 0.2
File Interpreter ABI Platform
arq_http-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 599.5 kB

Release files / arq_http-0.2.tar.gz

Download URL arq_http-0.2.tar.gz
Size 296.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ff1d9253780e3bb98b1e5c9df9351c1987c73a4098d90e0c571114d341856975
BLAKE2b-256 checksum
How to use checksums
f4378583a0218ab8028c4cb368c5f7ab607fb90a8a4e6559f98f2b6a1b7d2e14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / arq_http-0.2-py3-none-any.whl

Download URL arq_http-0.2-py3-none-any.whl
Size 302.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
552ea9702484a9aa4418a21480b937d0770928f4513525e6d21576ef1c511ffe
BLAKE2b-256 checksum
How to use checksums
a75a0167551cdafa2d20646bd7eda35c8cc133ac9eb0f4c7a64c8a50997f4810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page