plain.jobs 0.43.2__py3-none-any.whl
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.
- plain/jobs/CHANGELOG.md +461 -0
- plain/jobs/README.md +300 -0
- plain/jobs/__init__.py +6 -0
- plain/jobs/admin.py +249 -0
- plain/jobs/chores.py +19 -0
- plain/jobs/cli.py +204 -0
- plain/jobs/config.py +19 -0
- plain/jobs/default_settings.py +6 -0
- plain/jobs/exceptions.py +34 -0
- plain/jobs/jobs.py +368 -0
- plain/jobs/locks.py +42 -0
- plain/jobs/middleware.py +42 -0
- plain/jobs/migrations/0001_initial.py +246 -0
- plain/jobs/migrations/0002_job_span_id_job_trace_id_jobrequest_span_id_and_more.py +61 -0
- plain/jobs/migrations/0003_rename_job_jobprocess_and_more.py +80 -0
- plain/jobs/migrations/0004_rename_tables_to_plainjobs.py +33 -0
- plain/jobs/migrations/0005_rename_constraints_and_indexes.py +174 -0
- plain/jobs/migrations/0006_alter_jobprocess_table_alter_jobrequest_table_and_more.py +24 -0
- plain/jobs/migrations/0007_remove_jobrequest_plainjobs_jobrequest_unique_job_class_key_and_more.py +144 -0
- plain/jobs/migrations/__init__.py +0 -0
- plain/jobs/models.py +567 -0
- plain/jobs/parameters.py +193 -0
- plain/jobs/registry.py +60 -0
- plain/jobs/scheduling.py +253 -0
- plain/jobs/templates/admin/plainqueue/jobresult_detail.html +8 -0
- plain/jobs/workers.py +355 -0
- plain_jobs-0.43.2.dist-info/METADATA +312 -0
- plain_jobs-0.43.2.dist-info/RECORD +30 -0
- plain_jobs-0.43.2.dist-info/WHEEL +4 -0
- plain_jobs-0.43.2.dist-info/licenses/LICENSE +28 -0
plain/jobs/CHANGELOG.md
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
# plain-jobs changelog
|
|
2
|
+
|
|
3
|
+
## [0.43.2](https://github.com/dropseed/plain/releases/plain-jobs@0.43.2) (2026-01-22)
|
|
4
|
+
|
|
5
|
+
### What's changed
|
|
6
|
+
|
|
7
|
+
- Fixed `JobProcess.defer()` to use `self.id` instead of the deprecated `self.pk` attribute when restoring the job process ID after a failed re-enqueue attempt. This aligns with the change made in v0.25.0 where the `pk` alias was removed. ([08863e0fb0](https://github.com/dropseed/plain/commit/08863e0fb0))
|
|
8
|
+
|
|
9
|
+
### Upgrade instructions
|
|
10
|
+
|
|
11
|
+
- No changes required.
|
|
12
|
+
|
|
13
|
+
## [0.43.1](https://github.com/dropseed/plain/releases/plain-jobs@0.43.1) (2026-01-22)
|
|
14
|
+
|
|
15
|
+
### What's changed
|
|
16
|
+
|
|
17
|
+
- Fixed handling of `DeferError` when a job re-enqueue fails due to concurrency limits. Previously, if a deferred job couldn't be re-enqueued because the concurrency limit was already reached, the transaction would roll back but leave the `JobProcess` in an inconsistent state. Now the job is properly marked as errored with a descriptive error message, and the `pk` is restored so the job can be found again. ([10ecfc6dd7](https://github.com/dropseed/plain/commit/10ecfc6dd7))
|
|
18
|
+
|
|
19
|
+
### Upgrade instructions
|
|
20
|
+
|
|
21
|
+
- No changes required.
|
|
22
|
+
|
|
23
|
+
## [0.43.0](https://github.com/dropseed/plain/releases/plain-jobs@0.43.0) (2026-01-15)
|
|
24
|
+
|
|
25
|
+
### What's changed
|
|
26
|
+
|
|
27
|
+
- Improved admin interface with updated icons and descriptions for job request, process, and result list views ([0fc4dd345f](https://github.com/dropseed/plain/commit/0fc4dd345f))
|
|
28
|
+
|
|
29
|
+
### Upgrade instructions
|
|
30
|
+
|
|
31
|
+
- No changes required
|
|
32
|
+
|
|
33
|
+
## [0.42.0](https://github.com/dropseed/plain/releases/plain-jobs@0.42.0) (2026-01-13)
|
|
34
|
+
|
|
35
|
+
### What's changed
|
|
36
|
+
|
|
37
|
+
- Updated to use `RedirectResponse` instead of `ResponseRedirect` to align with the core response class naming convention ([fad5bf28b0](https://github.com/dropseed/plain/commit/fad5bf28b0))
|
|
38
|
+
|
|
39
|
+
### Upgrade instructions
|
|
40
|
+
|
|
41
|
+
- No changes required
|
|
42
|
+
|
|
43
|
+
## [0.41.2](https://github.com/dropseed/plain/releases/plain-jobs@0.41.2) (2025-12-22)
|
|
44
|
+
|
|
45
|
+
### What's changed
|
|
46
|
+
|
|
47
|
+
- Internal type annotation cleanup ([539a706760](https://github.com/dropseed/plain/commit/539a706760))
|
|
48
|
+
|
|
49
|
+
### Upgrade instructions
|
|
50
|
+
|
|
51
|
+
- No changes required
|
|
52
|
+
|
|
53
|
+
## [0.41.1](https://github.com/dropseed/plain/releases/plain-jobs@0.41.1) (2025-11-17)
|
|
54
|
+
|
|
55
|
+
### What's changed
|
|
56
|
+
|
|
57
|
+
- Model `query` attributes no longer use `ClassVar` type annotation, reverting to simpler direct type annotations ([1c624ff29e](https://github.com/dropseed/plain/commit/1c624ff29e))
|
|
58
|
+
|
|
59
|
+
### Upgrade instructions
|
|
60
|
+
|
|
61
|
+
- No changes required
|
|
62
|
+
|
|
63
|
+
## [0.41.0](https://github.com/dropseed/plain/releases/plain-jobs@0.41.0) (2025-11-13)
|
|
64
|
+
|
|
65
|
+
### What's changed
|
|
66
|
+
|
|
67
|
+
- Model `query` attributes now use `ClassVar` type annotation to properly indicate they are class-level attributes that return QuerySets ([c3b00a693c](https://github.com/dropseed/plain/commit/c3b00a693c))
|
|
68
|
+
|
|
69
|
+
### Upgrade instructions
|
|
70
|
+
|
|
71
|
+
- No changes required
|
|
72
|
+
|
|
73
|
+
## [0.40.0](https://github.com/dropseed/plain/releases/plain-jobs@0.40.0) (2025-11-13)
|
|
74
|
+
|
|
75
|
+
### What's changed
|
|
76
|
+
|
|
77
|
+
- Added explicit type stubs for all model fields using `plain.models.types` for better IDE support and type checking ([c8f40fc75a](https://github.com/dropseed/plain/commit/c8f40fc75a))
|
|
78
|
+
- Model field definitions now use type-annotated syntax (e.g., `field_name: type = types.CharField()`) instead of plain field assignments ([c8f40fc75a](https://github.com/dropseed/plain/commit/c8f40fc75a))
|
|
79
|
+
- Fixed potential issue where `parameters` could be `None` when loading a job by providing empty dict as default ([c8f40fc75a](https://github.com/dropseed/plain/commit/c8f40fc75a))
|
|
80
|
+
|
|
81
|
+
### Upgrade instructions
|
|
82
|
+
|
|
83
|
+
- No changes required
|
|
84
|
+
|
|
85
|
+
## [0.39.0](https://github.com/dropseed/plain/releases/plain-jobs@0.39.0) (2025-11-12)
|
|
86
|
+
|
|
87
|
+
### What's changed
|
|
88
|
+
|
|
89
|
+
- Improved type annotations across the codebase for better IDE support and type checking ([f4dbcefa92](https://github.com/dropseed/plain/commit/f4dbcefa92))
|
|
90
|
+
- Added type hints for `_init_args` and `_init_kwargs` attributes on the `Job` class that are set by the `JobType` metaclass ([f4dbcefa92](https://github.com/dropseed/plain/commit/f4dbcefa92))
|
|
91
|
+
- Fixed type annotation for `get_initial_queryset()` in admin views to properly indicate it returns `JobResultQuerySet` ([f4dbcefa92](https://github.com/dropseed/plain/commit/f4dbcefa92))
|
|
92
|
+
|
|
93
|
+
### Upgrade instructions
|
|
94
|
+
|
|
95
|
+
- No changes required
|
|
96
|
+
|
|
97
|
+
## [0.38.1](https://github.com/dropseed/plain/releases/plain-jobs@0.38.1) (2025-11-11)
|
|
98
|
+
|
|
99
|
+
### What's changed
|
|
100
|
+
|
|
101
|
+
- Updated imports to use explicit `plain.models.expressions` instead of accessing `Case`, `When`, and `F` through `plain.models` namespace ([e9edf61c6b](https://github.com/dropseed/plain/commit/e9edf61c6b))
|
|
102
|
+
|
|
103
|
+
### Upgrade instructions
|
|
104
|
+
|
|
105
|
+
- No changes required
|
|
106
|
+
|
|
107
|
+
## [0.38.0](https://github.com/dropseed/plain/releases/plain-jobs@0.38.0) (2025-11-09)
|
|
108
|
+
|
|
109
|
+
### What's changed
|
|
110
|
+
|
|
111
|
+
- Renamed `unique_key` to `concurrency_key` throughout the API for better clarity about its purpose as a grouping identifier ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
112
|
+
- Added `should_enqueue()` hook for implementing custom concurrency limits and rate limiting ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
113
|
+
- Added PostgreSQL advisory lock support to prevent race conditions when checking concurrency limits ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
114
|
+
- Added `DeferJob` exception for signaling jobs should be re-tried later without counting as errors ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
115
|
+
- Added helper methods `get_requested_jobs()` and `get_processing_jobs()` for querying jobs by concurrency key ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
116
|
+
- Renamed job configuration methods from `get_*()` to `default_*()` (e.g., `get_queue()` → `default_queue()`) to better indicate they provide defaults that can be overridden ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
117
|
+
- Renamed `get_retry_delay()` to `calculate_retry_delay()` for better semantic clarity ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
118
|
+
- Changed field types for `priority`, `retries`, and `retry_attempt` from `IntegerField` to `SmallIntegerField` for better database efficiency ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
119
|
+
- Added `DEFERRED` status to job results for jobs that were deferred and will be retried ([01b6986d79](https://github.com/dropseed/plain/commit/01b6986d79))
|
|
120
|
+
|
|
121
|
+
### Upgrade instructions
|
|
122
|
+
|
|
123
|
+
- Rename `unique_key` parameter to `concurrency_key` in all `run_in_worker()` calls
|
|
124
|
+
- Rename job method `get_unique_key()` to `default_concurrency_key()` if you've overridden it
|
|
125
|
+
- Rename job methods: `get_queue()` → `default_queue()`, `get_priority()` → `default_priority()`, `get_retries()` → `default_retries()`
|
|
126
|
+
- Rename `get_retry_delay()` to `calculate_retry_delay()` if you've overridden it
|
|
127
|
+
|
|
128
|
+
## [0.37.6](https://github.com/dropseed/plain/releases/plain-jobs@0.37.6) (2025-11-04)
|
|
129
|
+
|
|
130
|
+
### What's changed
|
|
131
|
+
|
|
132
|
+
- Removed info-level logging when a duplicate job is detected with a unique key to reduce log noise ([b6ad845180](https://github.com/dropseed/plain/commit/b6ad845180))
|
|
133
|
+
|
|
134
|
+
### Upgrade instructions
|
|
135
|
+
|
|
136
|
+
- No changes required
|
|
137
|
+
|
|
138
|
+
## [0.37.5](https://github.com/dropseed/plain/releases/plain-jobs@0.37.5) (2025-11-04)
|
|
139
|
+
|
|
140
|
+
### What's changed
|
|
141
|
+
|
|
142
|
+
- Added info-level logging when a duplicate job is detected with a unique key, making it easier to debug and monitor job deduplication ([8a9253bc63](https://github.com/dropseed/plain/commit/8a9253bc63))
|
|
143
|
+
|
|
144
|
+
### Upgrade instructions
|
|
145
|
+
|
|
146
|
+
- No changes required
|
|
147
|
+
|
|
148
|
+
## [0.37.4](https://github.com/dropseed/plain/releases/plain-jobs@0.37.4) (2025-11-03)
|
|
149
|
+
|
|
150
|
+
### What's changed
|
|
151
|
+
|
|
152
|
+
- Fixed migration documentation to reference correct renamed commands: `plain db shell` instead of `plain models db-shell` and `plain migrations prune` instead of `plain migrate --prune` ([b293750f6f](https://github.com/dropseed/plain/commit/b293750f6f))
|
|
153
|
+
|
|
154
|
+
### Upgrade instructions
|
|
155
|
+
|
|
156
|
+
- No changes required
|
|
157
|
+
|
|
158
|
+
## [0.37.3](https://github.com/dropseed/plain/releases/plain-jobs@0.37.3) (2025-11-03)
|
|
159
|
+
|
|
160
|
+
### What's changed
|
|
161
|
+
|
|
162
|
+
- No functional changes in this release
|
|
163
|
+
|
|
164
|
+
### Upgrade instructions
|
|
165
|
+
|
|
166
|
+
- No changes required
|
|
167
|
+
|
|
168
|
+
## [0.37.2](https://github.com/dropseed/plain/releases/plain-jobs@0.37.2) (2025-10-31)
|
|
169
|
+
|
|
170
|
+
### What's changed
|
|
171
|
+
|
|
172
|
+
- Added BSD-3-Clause license specification to package metadata ([8477355e65](https://github.com/dropseed/plain/commit/8477355e65))
|
|
173
|
+
|
|
174
|
+
### Upgrade instructions
|
|
175
|
+
|
|
176
|
+
- No changes required
|
|
177
|
+
|
|
178
|
+
## [0.37.1](https://github.com/dropseed/plain/releases/plain-jobs@0.37.1) (2025-10-24)
|
|
179
|
+
|
|
180
|
+
### What's changed
|
|
181
|
+
|
|
182
|
+
- Fixed admin interface filter functionality to correctly use `preset` instead of `display` for filtering job results ([26fde7d562](https://github.com/dropseed/plain/commit/26fde7d562))
|
|
183
|
+
|
|
184
|
+
### Upgrade instructions
|
|
185
|
+
|
|
186
|
+
- No changes required
|
|
187
|
+
|
|
188
|
+
## [0.37.0](https://github.com/dropseed/plain/releases/plain-jobs@0.37.0) (2025-10-22)
|
|
189
|
+
|
|
190
|
+
### What's changed
|
|
191
|
+
|
|
192
|
+
- Added `JobMiddleware` abstract base class for creating custom job middleware ([29e5c6df1a](https://github.com/dropseed/plain/commit/29e5c6df1a))
|
|
193
|
+
- Changed "preparing to execute job" log message from `logger.info` to `logger.debug` to reduce log noise ([8e25856639](https://github.com/dropseed/plain/commit/8e25856639))
|
|
194
|
+
|
|
195
|
+
### Upgrade instructions
|
|
196
|
+
|
|
197
|
+
- If you have custom job middleware, update them to inherit from `JobMiddleware` and implement the `process_job()` method instead of `__call__()`
|
|
198
|
+
|
|
199
|
+
## [0.36.3](https://github.com/dropseed/plain/releases/plain-jobs@0.36.3) (2025-10-20)
|
|
200
|
+
|
|
201
|
+
### What's changed
|
|
202
|
+
|
|
203
|
+
- Added garbage collection back to worker processes after job completion to help manage memory usage ([aafe3ace02](https://github.com/dropseed/plain/commit/aafe3ace02))
|
|
204
|
+
|
|
205
|
+
### Upgrade instructions
|
|
206
|
+
|
|
207
|
+
- No changes required
|
|
208
|
+
|
|
209
|
+
## [0.36.2](https://github.com/dropseed/plain/releases/plain-jobs@0.36.2) (2025-10-20)
|
|
210
|
+
|
|
211
|
+
### What's changed
|
|
212
|
+
|
|
213
|
+
- Fixed scheduled job detection logic to properly check for `None` instead of checking for list type when determining if a duplicate job was scheduled ([09e45fd96b](https://github.com/dropseed/plain/commit/09e45fd96b))
|
|
214
|
+
|
|
215
|
+
### Upgrade instructions
|
|
216
|
+
|
|
217
|
+
- No changes required
|
|
218
|
+
|
|
219
|
+
## [0.36.1](https://github.com/dropseed/plain/releases/plain-jobs@0.36.1) (2025-10-20)
|
|
220
|
+
|
|
221
|
+
### What's changed
|
|
222
|
+
|
|
223
|
+
- Fixed `run_in_worker()` to properly return `None` when a duplicate job is detected with a unique key, instead of returning the list of in-progress jobs ([5d7df365d6](https://github.com/dropseed/plain/commit/5d7df365d6))
|
|
224
|
+
|
|
225
|
+
### Upgrade instructions
|
|
226
|
+
|
|
227
|
+
- No changes required
|
|
228
|
+
|
|
229
|
+
## [0.36.0](https://github.com/dropseed/plain/releases/plain-jobs@0.36.0) (2025-10-17)
|
|
230
|
+
|
|
231
|
+
### What's changed
|
|
232
|
+
|
|
233
|
+
- Removed internal memory optimization attempts including manual garbage collection and object deletion in worker processes ([c7064ba329](https://github.com/dropseed/plain/commit/c7064ba329))
|
|
234
|
+
- Increased worker sleep interval from 0.1s to 0.5s when no jobs are available, reducing CPU usage during idle periods ([c7064ba329](https://github.com/dropseed/plain/commit/c7064ba329))
|
|
235
|
+
|
|
236
|
+
### Upgrade instructions
|
|
237
|
+
|
|
238
|
+
- No changes required
|
|
239
|
+
|
|
240
|
+
## [0.35.1](https://github.com/dropseed/plain/releases/plain-jobs@0.35.1) (2025-10-17)
|
|
241
|
+
|
|
242
|
+
### What's changed
|
|
243
|
+
|
|
244
|
+
- The `run_in_worker()` method now returns `None` when a duplicate job is detected instead of attempting to return the list of in-progress jobs ([72f48d21bc](https://github.com/dropseed/plain/commit/72f48d21bc))
|
|
245
|
+
- Fixed type annotations for `run_in_worker()` to properly indicate it can return `JobRequest | None` ([72f48d21bc](https://github.com/dropseed/plain/commit/72f48d21bc))
|
|
246
|
+
- The `retry_job()` method now properly handles explicit `delay=0` parameter to intentionally retry immediately ([72f48d21bc](https://github.com/dropseed/plain/commit/72f48d21bc))
|
|
247
|
+
- Fixed type annotations for `retry_job()` to properly indicate it can return `JobRequest | None` ([72f48d21bc](https://github.com/dropseed/plain/commit/72f48d21bc))
|
|
248
|
+
|
|
249
|
+
### Upgrade instructions
|
|
250
|
+
|
|
251
|
+
- No changes required
|
|
252
|
+
|
|
253
|
+
## [0.35.0](https://github.com/dropseed/plain/releases/plain-jobs@0.35.0) (2025-10-17)
|
|
254
|
+
|
|
255
|
+
### What's changed
|
|
256
|
+
|
|
257
|
+
- The `Job` base class is now an abstract base class requiring implementation of the `run()` method ([e34282bba8](https://github.com/dropseed/plain/commit/e34282bba8))
|
|
258
|
+
- Job worker processes now properly initialize the Plain framework before processing jobs, fixing potential startup issues ([c4551d1b84](https://github.com/dropseed/plain/commit/c4551d1b84))
|
|
259
|
+
- The `plain jobs list` command now displays job descriptions from docstrings in a cleaner format ([4b6881a49e](https://github.com/dropseed/plain/commit/4b6881a49e))
|
|
260
|
+
- Job requests in the admin interface are now ordered by priority, start time, and created time to match worker processing order ([c18f0e3fb6](https://github.com/dropseed/plain/commit/c18f0e3fb6))
|
|
261
|
+
- The `ClearCompleted` chore has been refactored to use the new abstract base class pattern ([c4466d3c60](https://github.com/dropseed/plain/commit/c4466d3c60))
|
|
262
|
+
|
|
263
|
+
### Upgrade instructions
|
|
264
|
+
|
|
265
|
+
- No changes required
|
|
266
|
+
|
|
267
|
+
## [0.34.0](https://github.com/dropseed/plain/releases/plain-jobs@0.34.0) (2025-10-13)
|
|
268
|
+
|
|
269
|
+
### What's changed
|
|
270
|
+
|
|
271
|
+
- Added `--reload` flag to `plain jobs worker` command for automatic reloading when code changes are detected ([f3db87e9aa](https://github.com/dropseed/plain/commit/f3db87e9aa))
|
|
272
|
+
- Worker reloader now only watches `.py` and `.env*` files, not HTML files ([f2f31c288b](https://github.com/dropseed/plain/commit/f2f31c288b))
|
|
273
|
+
|
|
274
|
+
### Upgrade instructions
|
|
275
|
+
|
|
276
|
+
- Custom autoreloaders for development are no longer needed -- use the built-in `--reload` flag instead
|
|
277
|
+
|
|
278
|
+
## [0.33.0](https://github.com/dropseed/plain/releases/plain-jobs@0.33.0) (2025-10-10)
|
|
279
|
+
|
|
280
|
+
### What's changed
|
|
281
|
+
|
|
282
|
+
- Renamed package from `plain.worker` to `plain.jobs` ([24219856e0](https://github.com/dropseed/plain/commit/24219856e0))
|
|
283
|
+
|
|
284
|
+
### Upgrade instructions
|
|
285
|
+
|
|
286
|
+
- Update any imports from `plain.worker` to `plain.jobs` (e.g., `from plain.worker import Job` becomes `from plain.jobs import Job`)
|
|
287
|
+
- Change worker commands from `plain worker run` to `plain jobs worker`
|
|
288
|
+
- Check updated settings names
|
|
289
|
+
|
|
290
|
+
## [0.32.0](https://github.com/dropseed/plain/releases/plain-jobs@0.32.0) (2025-10-07)
|
|
291
|
+
|
|
292
|
+
### What's changed
|
|
293
|
+
|
|
294
|
+
- Models now use `model_options` instead of `_meta` for accessing model configuration like `package_label` and `model_name` ([73ba469](https://github.com/dropseed/plain/commit/73ba469ba0))
|
|
295
|
+
- Model configuration now uses `model_options = models.Options()` instead of `class Meta` ([17a378d](https://github.com/dropseed/plain/commit/17a378dcfb))
|
|
296
|
+
- QuerySet types now properly use `Self` return type for better type checking ([2578301](https://github.com/dropseed/plain/commit/2578301819))
|
|
297
|
+
- Removed unnecessary type ignore comments now that QuerySet is properly typed ([2578301](https://github.com/dropseed/plain/commit/2578301819))
|
|
298
|
+
|
|
299
|
+
### Upgrade instructions
|
|
300
|
+
|
|
301
|
+
- No changes required
|
|
302
|
+
|
|
303
|
+
## [0.31.1](https://github.com/dropseed/plain/releases/plain-jobs@0.31.1) (2025-10-06)
|
|
304
|
+
|
|
305
|
+
### What's changed
|
|
306
|
+
|
|
307
|
+
- Updated dependency resolution to use newer compatible versions of `plain` and `plain.models`
|
|
308
|
+
|
|
309
|
+
### Upgrade instructions
|
|
310
|
+
|
|
311
|
+
- No changes required
|
|
312
|
+
|
|
313
|
+
## [0.31.0](https://github.com/dropseed/plain/releases/plain-jobs@0.31.0) (2025-09-25)
|
|
314
|
+
|
|
315
|
+
### What's changed
|
|
316
|
+
|
|
317
|
+
- The jobs autodiscovery now includes `app.jobs` modules in addition to package jobs modules ([b0b610d](https://github.com/dropseed/plain/commit/b0b610d461))
|
|
318
|
+
|
|
319
|
+
### Upgrade instructions
|
|
320
|
+
|
|
321
|
+
- No changes required
|
|
322
|
+
|
|
323
|
+
## [0.30.0](https://github.com/dropseed/plain/releases/plain-jobs@0.30.0) (2025-09-19)
|
|
324
|
+
|
|
325
|
+
### What's changed
|
|
326
|
+
|
|
327
|
+
- The `Job` model has been renamed to `JobProcess` for better clarity ([986c914](https://github.com/dropseed/plain/commit/986c914))
|
|
328
|
+
- The `job_uuid` field in JobResult has been renamed to `job_process_uuid` to match the model rename ([986c914](https://github.com/dropseed/plain/commit/986c914))
|
|
329
|
+
- Admin interface now shows "Job processes" as the section title instead of "Jobs" ([986c914](https://github.com/dropseed/plain/commit/986c914))
|
|
330
|
+
|
|
331
|
+
### Upgrade instructions
|
|
332
|
+
|
|
333
|
+
- Run `plain migrate` to apply the database migration that renames the Job model to JobProcess
|
|
334
|
+
- If you have any custom code that directly references the `Job` model (different than the `Job` base class for job type definitions), update it to use `JobProcess` instead
|
|
335
|
+
- If you have any code that accesses the `job_uuid` field on JobResult instances, update it to use `job_process_uuid`
|
|
336
|
+
|
|
337
|
+
## [0.29.0](https://github.com/dropseed/plain/releases/plain-jobs@0.29.0) (2025-09-12)
|
|
338
|
+
|
|
339
|
+
### What's changed
|
|
340
|
+
|
|
341
|
+
- Model managers have been renamed from `.objects` to `.query` ([037a239](https://github.com/dropseed/plain/commit/037a239ef4))
|
|
342
|
+
- Manager functionality has been merged into QuerySet classes ([bbaee93](https://github.com/dropseed/plain/commit/bbaee93839))
|
|
343
|
+
- Models now use `Meta.queryset_class` instead of separate manager configuration ([6b60a00](https://github.com/dropseed/plain/commit/6b60a00731))
|
|
344
|
+
|
|
345
|
+
### Upgrade instructions
|
|
346
|
+
|
|
347
|
+
- Update all model queries to use `.query` instead of `.objects` (e.g., `Job.query.all()` becomes `Job.query.all()`)
|
|
348
|
+
|
|
349
|
+
## [0.28.1](https://github.com/dropseed/plain/releases/plain-jobs@0.28.1) (2025-09-10)
|
|
350
|
+
|
|
351
|
+
### What's changed
|
|
352
|
+
|
|
353
|
+
- Fixed log context method in worker middleware to use `include_context` instead of `with_context` ([755f873](https://github.com/dropseed/plain/commit/755f873986))
|
|
354
|
+
|
|
355
|
+
### Upgrade instructions
|
|
356
|
+
|
|
357
|
+
- No changes required
|
|
358
|
+
|
|
359
|
+
## [0.28.0](https://github.com/dropseed/plain/releases/plain-jobs@0.28.0) (2025-09-09)
|
|
360
|
+
|
|
361
|
+
### What's changed
|
|
362
|
+
|
|
363
|
+
- Improved logging middleware to use context manager pattern for cleaner job context handling ([ea7c953](https://github.com/dropseed/plain/commit/ea7c9537e3))
|
|
364
|
+
- Updated minimum Python requirement to 3.13 ([d86e307](https://github.com/dropseed/plain/commit/d86e307efb))
|
|
365
|
+
- Added explicit nav_icon definitions to admin views to ensure consistent icon display ([2aac07d](https://github.com/dropseed/plain/commit/2aac07de4e))
|
|
366
|
+
|
|
367
|
+
### Upgrade instructions
|
|
368
|
+
|
|
369
|
+
- No changes required
|
|
370
|
+
|
|
371
|
+
## [0.27.1](https://github.com/dropseed/plain/releases/plain-jobs@0.27.1) (2025-08-27)
|
|
372
|
+
|
|
373
|
+
### What's changed
|
|
374
|
+
|
|
375
|
+
- Jobs are now marked as cancelled when the worker process is killed or fails unexpectedly ([e73ca53](https://github.com/dropseed/plain/commit/e73ca53c3d))
|
|
376
|
+
|
|
377
|
+
### Upgrade instructions
|
|
378
|
+
|
|
379
|
+
- No changes required
|
|
380
|
+
|
|
381
|
+
## [0.27.0](https://github.com/dropseed/plain/releases/plain-jobs@0.27.0) (2025-08-22)
|
|
382
|
+
|
|
383
|
+
### What's changed
|
|
384
|
+
|
|
385
|
+
- Added support for date and datetime job parameters with proper serialization/deserialization ([7bb5ab0911](https://github.com/dropseed/plain/commit/7bb5ab0911))
|
|
386
|
+
- Improved job priority documentation to clarify that higher numbers run first ([73271b5bf0](https://github.com/dropseed/plain/commit/73271b5bf0))
|
|
387
|
+
- Updated admin interface with consolidated navigation icons at the section level ([5a6479ac79](https://github.com/dropseed/plain/commit/5a6479ac79))
|
|
388
|
+
- Enhanced admin views to use cached object properties for better performance ([bd0507a72c](https://github.com/dropseed/plain/commit/bd0507a72c))
|
|
389
|
+
|
|
390
|
+
### Upgrade instructions
|
|
391
|
+
|
|
392
|
+
- No changes required
|
|
393
|
+
|
|
394
|
+
## [0.26.0](https://github.com/dropseed/plain/releases/plain-jobs@0.26.0) (2025-08-19)
|
|
395
|
+
|
|
396
|
+
### What's changed
|
|
397
|
+
|
|
398
|
+
- Improved CSRF token handling in admin forms by removing manual `csrf_input` in favor of automatic Sec-Fetch-Site header validation ([955150800c](https://github.com/dropseed/plain/commit/955150800c))
|
|
399
|
+
- Enhanced README documentation with comprehensive examples, table of contents, and detailed sections covering job parameters, scheduling, monitoring, and FAQs ([4ebecd1856](https://github.com/dropseed/plain/commit/4ebecd1856))
|
|
400
|
+
- Updated package description to be more descriptive: "Process background jobs with a database-driven worker" ([4ebecd1856](https://github.com/dropseed/plain/commit/4ebecd1856))
|
|
401
|
+
|
|
402
|
+
### Upgrade instructions
|
|
403
|
+
|
|
404
|
+
- No changes required
|
|
405
|
+
|
|
406
|
+
## [0.25.1](https://github.com/dropseed/plain/releases/plain-jobs@0.25.1) (2025-07-23)
|
|
407
|
+
|
|
408
|
+
### What's changed
|
|
409
|
+
|
|
410
|
+
- Added Bootstrap icons to admin interface for worker job views ([9e9f8b0](https://github.com/dropseed/plain/commit/9e9f8b0e2ccc3174f05034e6e908bb26345e1a5c))
|
|
411
|
+
- Removed the description field from admin views ([8d2352d](https://github.com/dropseed/plain/commit/8d2352db94277ddd87b6a480783c9f740b6e806f))
|
|
412
|
+
|
|
413
|
+
### Upgrade instructions
|
|
414
|
+
|
|
415
|
+
- No changes required
|
|
416
|
+
|
|
417
|
+
## [0.25.0](https://github.com/dropseed/plain/releases/plain-jobs@0.25.0) (2025-07-22)
|
|
418
|
+
|
|
419
|
+
### What's changed
|
|
420
|
+
|
|
421
|
+
- Removed `pk` alias and auto fields in favor of a single automatic `id` PrimaryKeyField ([4b8fa6a](https://github.com/dropseed/plain/commit/4b8fa6aef126a15e48b5f85e0652adf841eb7b5c))
|
|
422
|
+
- Admin interface methods now use `target_ids` parameter instead of `target_pks` for batch actions
|
|
423
|
+
- Model instance registry now uses `.id` instead of `.pk` for Global ID generation
|
|
424
|
+
- Updated database migrations to use `models.PrimaryKeyField()` instead of `models.BigAutoField()`
|
|
425
|
+
|
|
426
|
+
### Upgrade instructions
|
|
427
|
+
|
|
428
|
+
- No changes required
|
|
429
|
+
|
|
430
|
+
## [0.24.0](https://github.com/dropseed/plain/releases/plain-jobs@0.24.0) (2025-07-18)
|
|
431
|
+
|
|
432
|
+
### What's changed
|
|
433
|
+
|
|
434
|
+
- Added OpenTelemetry tracing support to job processing system ([b0224d0](https://github.com/dropseed/plain/commit/b0224d0418))
|
|
435
|
+
- Job requests now capture trace context when queued from traced operations
|
|
436
|
+
- Job execution creates proper consumer spans linked to the original producer trace
|
|
437
|
+
- Added `trace_id` and `span_id` fields to JobRequest, Job, and JobResult models for trace correlation
|
|
438
|
+
|
|
439
|
+
### Upgrade instructions
|
|
440
|
+
|
|
441
|
+
- Run `plain migrate` to apply new database migration that adds trace context fields to worker tables
|
|
442
|
+
|
|
443
|
+
## [0.23.0](https://github.com/dropseed/plain/releases/plain-jobs@0.23.0) (2025-07-18)
|
|
444
|
+
|
|
445
|
+
### What's changed
|
|
446
|
+
|
|
447
|
+
- Migrations have been reset and consolidated into a single initial migration ([484f1b6e93](https://github.com/dropseed/plain/commit/484f1b6e93))
|
|
448
|
+
|
|
449
|
+
### Upgrade instructions
|
|
450
|
+
|
|
451
|
+
- Run `plain migrate --prune plainworker` to remove old migration records and apply the consolidated migration
|
|
452
|
+
|
|
453
|
+
## [0.22.5](https://github.com/dropseed/plain/releases/plain-jobs@0.22.5) (2025-06-24)
|
|
454
|
+
|
|
455
|
+
### What's changed
|
|
456
|
+
|
|
457
|
+
- No functional changes. This release only updates internal documentation (CHANGELOG) and contains no code modifications that impact users ([82710c3](https://github.com/dropseed/plain/commit/82710c3), [9a1963d](https://github.com/dropseed/plain/commit/9a1963d), [e1f5dd3](https://github.com/dropseed/plain/commit/e1f5dd3)).
|
|
458
|
+
|
|
459
|
+
### Upgrade instructions
|
|
460
|
+
|
|
461
|
+
- No changes required
|