You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-41Lines changed: 45 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,23 @@
1
-
[](https://github.com/flowdacity/flowdacity-queue-server/actions/workflows/test.yml)
[](https://github.com/flowdacity/queue-server/actions/workflows/test.yml)
An async HTTP API for the [Flowdacity Queue (FQ)](https://github.com/flowdacity/flowdacity-queue) core, built with Starlette and Uvicorn. It keeps the original SHARQ behavior (leaky-bucket rate limiting and dynamic queues) while modernizing the stack.
7
+
An async HTTP API for [Flowdacity Queue (FQ)](https://github.com/flowdacity/queue-engine), built with Starlette and Uvicorn.
8
8
9
9
## Prerequisites
10
10
11
11
- Python 3.12+
12
-
- Redis 7+ reachable from the server
13
-
- A Flowdacity Queue config file (see `default.conf` for a starter)
12
+
- Redis 7+
14
13
15
14
## Installation
16
15
17
-
Clone the repo and install the package plus dev tools (uses [`uv`](https://github.com/astral-sh/uv) by default):
18
-
19
16
```bash
20
17
uv sync --group dev
21
-
# or: uv pip install --system .
22
18
```
23
19
24
-
If you prefer pip/venv without `uv`:
20
+
If you prefer a virtualenv without `uv`:
25
21
26
22
```bash
27
23
python -m venv .venv
@@ -32,29 +28,48 @@ pip install pytest pytest-cov
32
28
33
29
## Configuration
34
30
35
-
- Point the server at your FQ config via `FQ_CONFIG` (defaults to `./default.conf`).
|`REDIS_UNIX_SOCKET_PATH`|`/tmp/redis.sock`| Redis socket path when `REDIS_CONN_TYPE=unix_sock`. |
49
+
50
+
Boolean env vars accept only `true` or `false`.
51
+
52
+
`PORT` is not part of `QueueServerSettings`. It is runtime launcher configuration used by the container entrypoint or by the `uvicorn` CLI, so pass it as a launcher environment variable or `--port` argument.
53
+
54
+
## Run locally
55
+
56
+
Start Redis:
41
57
42
58
```bash
43
-
cp default.conf local.conf
44
-
# edit local.conf to match your Redis host/port/password
59
+
make redis-up
45
60
```
46
61
47
-
## Run the server locally
62
+
Run the API:
48
63
49
64
```bash
50
-
# ensure Redis is running (make redis starts a container)
51
-
make redis
52
-
53
-
# start the ASGI server
54
-
FQ_CONFIG=./local.conf uv run uvicorn asgi:app --host 0.0.0.0 --port 8080
65
+
export PORT=8300
66
+
export REDIS_HOST=127.0.0.1
67
+
uv run uvicorn asgi:app --host 0.0.0.0 --port "${PORT}"
55
68
```
56
69
57
-
Docker Compose is also available:
70
+
## Docker
71
+
72
+
`docker-compose.yml` now passes the queue settings through env vars, so there is no mounted config file:
58
73
59
74
```bash
60
75
docker compose up --build
@@ -63,34 +78,23 @@ docker compose up --build
63
78
## API quick start
64
79
65
80
```bash
66
-
# health
67
-
curl http://127.0.0.1:8080/
81
+
curl http://127.0.0.1:8300/
68
82
69
-
# enqueue a job
70
-
curl -X POST http://127.0.0.1:8080/enqueue/sms/user42/ \
83
+
curl -X POST http://127.0.0.1:8300/enqueue/sms/user42/ \
0 commit comments