localqueue 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {localqueue-0.1.0 → localqueue-0.1.1}/CHANGELOG.md +5 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/PKG-INFO +9 -1
- {localqueue-0.1.0 → localqueue-0.1.1}/README.md +4 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/api.md +4 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/index.md +2 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/queues.md +13 -3
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/release.md +1 -1
- {localqueue-0.1.0 → localqueue-0.1.1}/pyproject.toml +7 -1
- {localqueue-0.1.0 → localqueue-0.1.1}/uv.lock +1 -1
- {localqueue-0.1.0 → localqueue-0.1.1}/.gitignore +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/LICENSE +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/operational-maturity.md +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/docs/retries.md +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/examples/email_worker.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/examples/enqueue_email.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/__init__.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/cli.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/queue.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/__init__.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/store.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/tenacity.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/store.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/worker.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_cli.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_queue.py +0 -0
- {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_retry.py +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: localqueue
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Durable local queues for Python, with persistent retry state powered by Tenacity.
|
|
5
|
+
Project-URL: Homepage, https://brunoportis.github.io/localqueue/
|
|
6
|
+
Project-URL: Documentation, https://brunoportis.github.io/localqueue/
|
|
7
|
+
Project-URL: Repository, https://github.com/brunoportis/localqueue
|
|
8
|
+
Project-URL: Issues, https://github.com/brunoportis/localqueue/issues
|
|
5
9
|
Author: Bruno Portis
|
|
6
10
|
License-Expression: MIT
|
|
7
11
|
License-File: LICENSE
|
|
@@ -159,6 +163,10 @@ localqueue queue exec webhooks -- curl -X POST https://example.com/hook -d @-
|
|
|
159
163
|
localqueue queue exec emails -- sh -c 'jq -r .to | xargs -I{} curl https://example.com/{}'
|
|
160
164
|
```
|
|
161
165
|
|
|
166
|
+
Command output is captured so the CLI can keep printing its own JSON status.
|
|
167
|
+
When a command fails, `last_error` includes the command, exit code, stdout, and
|
|
168
|
+
stderr, truncated for inspection.
|
|
169
|
+
|
|
162
170
|
Use `--forever` for a long-running worker. When interrupted with `SIGINT` or
|
|
163
171
|
`SIGTERM`, the CLI finishes the current message before stopping.
|
|
164
172
|
|
|
@@ -128,6 +128,10 @@ localqueue queue exec webhooks -- curl -X POST https://example.com/hook -d @-
|
|
|
128
128
|
localqueue queue exec emails -- sh -c 'jq -r .to | xargs -I{} curl https://example.com/{}'
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
Command output is captured so the CLI can keep printing its own JSON status.
|
|
132
|
+
When a command fails, `last_error` includes the command, exit code, stdout, and
|
|
133
|
+
stderr, truncated for inspection.
|
|
134
|
+
|
|
131
135
|
Use `--forever` for a long-running worker. When interrupted with `SIGINT` or
|
|
132
136
|
`SIGTERM`, the CLI finishes the current message before stopping.
|
|
133
137
|
|
|
@@ -94,6 +94,10 @@ Dataclass returned by `put()` and `get_message()`.
|
|
|
94
94
|
| `last_error` | structured error from the most recent failed processing attempt, if recorded |
|
|
95
95
|
| `failed_at` | timestamp for `last_error`, if recorded |
|
|
96
96
|
|
|
97
|
+
For `localqueue queue exec` failures, `last_error` also includes `command`,
|
|
98
|
+
`exit_code`, `stdout`, and `stderr` fields so command workers can be inspected
|
|
99
|
+
from `queue inspect` and `queue dead`.
|
|
100
|
+
|
|
97
101
|
#### `QueueStats`
|
|
98
102
|
|
|
99
103
|
Dataclass returned by `stats()`.
|
|
@@ -50,6 +50,8 @@ localqueue queue exec emails -- python scripts/send_email.py
|
|
|
50
50
|
`queue exec` writes the message value to the command's stdin as JSON. Exit code
|
|
51
51
|
`0` acknowledges the message. Any other exit code is treated as a failed handler
|
|
52
52
|
attempt and follows the configured retry, release, and dead-letter policy.
|
|
53
|
+
Command failures are recorded in `last_error` with the command, exit code,
|
|
54
|
+
stdout, and stderr.
|
|
53
55
|
|
|
54
56
|
Run a continuous local worker with `--forever`. `SIGINT` and `SIGTERM` request a
|
|
55
57
|
graceful stop after the current message finishes.
|
|
@@ -95,9 +95,19 @@ localqueue queue exec jobs -- sh -c 'jq -r .id | xargs -I{} ./process-job {}'
|
|
|
95
95
|
|
|
96
96
|
The command receives `message.value` on stdin as JSON. `localqueue` captures the
|
|
97
97
|
command output so the CLI can keep printing its own JSON status. Exit code `0`
|
|
98
|
-
acks the message. Any other exit code raises a command failure
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
acks the message. Any other exit code raises a command failure and applies the
|
|
99
|
+
same retry, release, or dead-letter behavior as `queue process`.
|
|
100
|
+
|
|
101
|
+
Command failures are stored in `last_error` with structured fields:
|
|
102
|
+
|
|
103
|
+
| Field | Meaning |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| `type` | `_CommandExecutionError` |
|
|
106
|
+
| `message` | human-readable command failure |
|
|
107
|
+
| `command` | argv list that was executed |
|
|
108
|
+
| `exit_code` | command exit code |
|
|
109
|
+
| `stdout` | captured stdout, truncated for inspection |
|
|
110
|
+
| `stderr` | captured stderr, truncated for inspection |
|
|
101
111
|
|
|
102
112
|
Commands are executed without an implicit shell. Use `sh -c` explicitly when you
|
|
103
113
|
want pipes, redirects, shell expansion, or multiple commands.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "localqueue"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.1"
|
|
4
4
|
description = "Durable local queues for Python, with persistent retry state powered by Tenacity."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -43,6 +43,12 @@ all = [
|
|
|
43
43
|
[project.scripts]
|
|
44
44
|
localqueue = "localqueue.cli:main"
|
|
45
45
|
|
|
46
|
+
[project.urls]
|
|
47
|
+
Homepage = "https://brunoportis.github.io/localqueue/"
|
|
48
|
+
Documentation = "https://brunoportis.github.io/localqueue/"
|
|
49
|
+
Repository = "https://github.com/brunoportis/localqueue"
|
|
50
|
+
Issues = "https://github.com/brunoportis/localqueue/issues"
|
|
51
|
+
|
|
46
52
|
[build-system]
|
|
47
53
|
requires = ["hatchling>=1.27.0"]
|
|
48
54
|
build-backend = "hatchling.build"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|