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
Job listing
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arq_http-0.2.tar.gz | 296.9 kB | Without provenance | Details for arq_http-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arq_http-0.2-py3-none-any.whl | Python 3 | none | any | Details for arq_http-0.2-py3-none-any.whl |
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
|
Security for arq-http 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.