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.
Files changed (26) hide show
  1. {localqueue-0.1.0 → localqueue-0.1.1}/CHANGELOG.md +5 -0
  2. {localqueue-0.1.0 → localqueue-0.1.1}/PKG-INFO +9 -1
  3. {localqueue-0.1.0 → localqueue-0.1.1}/README.md +4 -0
  4. {localqueue-0.1.0 → localqueue-0.1.1}/docs/api.md +4 -0
  5. {localqueue-0.1.0 → localqueue-0.1.1}/docs/index.md +2 -0
  6. {localqueue-0.1.0 → localqueue-0.1.1}/docs/queues.md +13 -3
  7. {localqueue-0.1.0 → localqueue-0.1.1}/docs/release.md +1 -1
  8. {localqueue-0.1.0 → localqueue-0.1.1}/pyproject.toml +7 -1
  9. {localqueue-0.1.0 → localqueue-0.1.1}/uv.lock +1 -1
  10. {localqueue-0.1.0 → localqueue-0.1.1}/.gitignore +0 -0
  11. {localqueue-0.1.0 → localqueue-0.1.1}/LICENSE +0 -0
  12. {localqueue-0.1.0 → localqueue-0.1.1}/docs/operational-maturity.md +0 -0
  13. {localqueue-0.1.0 → localqueue-0.1.1}/docs/retries.md +0 -0
  14. {localqueue-0.1.0 → localqueue-0.1.1}/examples/email_worker.py +0 -0
  15. {localqueue-0.1.0 → localqueue-0.1.1}/examples/enqueue_email.py +0 -0
  16. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/__init__.py +0 -0
  17. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/cli.py +0 -0
  18. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/queue.py +0 -0
  19. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/__init__.py +0 -0
  20. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/store.py +0 -0
  21. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/retry/tenacity.py +0 -0
  22. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/store.py +0 -0
  23. {localqueue-0.1.0 → localqueue-0.1.1}/localqueue/worker.py +0 -0
  24. {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_cli.py +0 -0
  25. {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_queue.py +0 -0
  26. {localqueue-0.1.0 → localqueue-0.1.1}/tests/test_retry.py +0 -0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Add project URLs for PyPI metadata.
6
+ - Document `queue exec` command-failure fields stored in `last_error`.
7
+
3
8
  ## 0.1.0
4
9
 
5
10
  - Add persistent retry wrappers for sync and async Tenacity retryers.
@@ -1,7 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: localqueue
3
- Version: 0.1.0
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, records the exit
99
- code and stderr in `last_error`, and applies the same retry, release, or
100
- dead-letter behavior as `queue process`.
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.
@@ -104,4 +104,4 @@ Before `1.0.0`, use this convention:
104
104
 
105
105
  ## Current Release
106
106
 
107
- The current planned release is `0.1.0`.
107
+ The current planned release is `0.1.1`.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "localqueue"
3
- version = "0.1.0"
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"
@@ -200,7 +200,7 @@ wheels = [
200
200
 
201
201
  [[package]]
202
202
  name = "localqueue"
203
- version = "0.1.0"
203
+ version = "0.1.1"
204
204
  source = { editable = "." }
205
205
  dependencies = [
206
206
  { name = "tenacity" },
File without changes
File without changes
File without changes
File without changes
File without changes