plain.jobs 0.36.0__py3-none-any.whl → 0.36.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.

Potentially problematic release.


This version of plain.jobs might be problematic. Click here for more details.

plain/jobs/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # plain-jobs changelog
2
2
 
3
+ ## [0.36.2](https://github.com/dropseed/plain/releases/plain-jobs@0.36.2) (2025-10-20)
4
+
5
+ ### What's changed
6
+
7
+ - 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))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
13
+ ## [0.36.1](https://github.com/dropseed/plain/releases/plain-jobs@0.36.1) (2025-10-20)
14
+
15
+ ### What's changed
16
+
17
+ - 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))
18
+
19
+ ### Upgrade instructions
20
+
21
+ - No changes required
22
+
3
23
  ## [0.36.0](https://github.com/dropseed/plain/releases/plain-jobs@0.36.0) (2025-10-17)
4
24
 
5
25
  ### What's changed
plain/jobs/jobs.py CHANGED
@@ -119,9 +119,9 @@ class Job(metaclass=JobType):
119
119
  # Only need to look at in progress jobs
120
120
  # if we also have a unique key.
121
121
  # Otherwise it's up to the user to use _in_progress()
122
- if running := self._in_progress(unique_key):
122
+ if self._in_progress(unique_key):
123
123
  span.set_attribute(ERROR_TYPE, "DuplicateJob")
124
- return running
124
+ return None
125
125
 
126
126
  # Is recording is not enough here... because we also record for summaries!
127
127
 
plain/jobs/workers.py CHANGED
@@ -224,8 +224,8 @@ class Worker:
224
224
  delay=next_start_at,
225
225
  unique_key=schedule_unique_key,
226
226
  )
227
- # Results are a list if it found scheduled/running jobs...
228
- if not isinstance(result, list):
227
+ # Result is None if a duplicate job was detected
228
+ if result:
229
229
  logger.info(
230
230
  'Scheduling job job_class=%s job_queue="%s" job_start_at="%s" job_schedule="%s" job_unique_key="%s"',
231
231
  result.job_class,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.jobs
3
- Version: 0.36.0
3
+ Version: 0.36.2
4
4
  Summary: Process background jobs with a database-driven job queue.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- plain/jobs/CHANGELOG.md,sha256=9oOxk4cLHZAgsTxiv-vEifvNBuuXtxvMTA1SWnsb8JA,11847
1
+ plain/jobs/CHANGELOG.md,sha256=jCOSyuP7LrxP-tkEk4YgHbESlUNjsHhsnrL_Yk7fvqs,12604
2
2
  plain/jobs/README.md,sha256=Xuhz2Q48G9WeGCh5OWGVBlaSea4eKCqWzcTAtZRrS0I,6835
3
3
  plain/jobs/__init__.py,sha256=p2ATql3HyPzPTV34gJQ04caT7tcNQLbBGM6uIoDPbjo,92
4
4
  plain/jobs/admin.py,sha256=t1UEchq1-Eews_wPsVUofaqbzPaYpb-8H1bUlA59JGI,6785
@@ -6,13 +6,13 @@ plain/jobs/chores.py,sha256=oyVU-BfcJxMM3eK2_umn38N2mBsNpcDrZfpeEQju_DA,528
6
6
  plain/jobs/cli.py,sha256=PPoT7xjl818BZnmI0yA_UCLEQkzl_Tv1_hiuJW9UE-Q,5911
7
7
  plain/jobs/config.py,sha256=PQsl-LxWsWLnjC98f0mvtdcCOuXvXKDMjrCRf1fq44Y,550
8
8
  plain/jobs/default_settings.py,sha256=r_95ucg_KY1XW1jarZy8VO3p-ylbllKMUrHzOPJiX6U,227
9
- plain/jobs/jobs.py,sha256=ZEne6eTVPoWBv-JUAB9GugdIR0pb2I5SDfJlxCrNI4c,7775
9
+ plain/jobs/jobs.py,sha256=-tBt_5V2KwGui7OpBcq1gANVn3YvKEoBJn0MXNlnKlo,7761
10
10
  plain/jobs/middleware.py,sha256=bz8aPBY0RbtLS4kic8mzPOd3EyQFCVRQ2uTCttT3RpE,573
11
11
  plain/jobs/models.py,sha256=TYOjMT0dSF69uzfY2m13ZPwo6G0WOVJUbgJvsDFxBhI,15889
12
12
  plain/jobs/parameters.py,sha256=t9PwEZgwNCJx3YobsT-jfaVZdfMBS54XJcBrT9Wnsg0,6313
13
13
  plain/jobs/registry.py,sha256=Rwn5Htll10e549vD2Mu0oyoDynyHhE0bGYZ2bq9uzPU,1679
14
14
  plain/jobs/scheduling.py,sha256=fqpFnVoIIV-muf82WzuLyioSmiilfZ76KFjXzt8grIk,7851
15
- plain/jobs/workers.py,sha256=cHWxdAKbhyRACwRap7Eh1wfbOQzXLAl6o_8DR8zLA-Y,13546
15
+ plain/jobs/workers.py,sha256=q8bixbv1m5iZMiQRYVfGGzlDF80T12zm0QNE1EUatj4,13514
16
16
  plain/jobs/migrations/0001_initial.py,sha256=EIgIEMVyTsStyx9dmKM8Jb_hwn694Yo31-74DZkNTqo,9452
17
17
  plain/jobs/migrations/0002_job_span_id_job_trace_id_jobrequest_span_id_and_more.py,sha256=ph5BwwOAwdfjdNh9RItYmX_IA29lO-Dd9GymYzvChXQ,1953
18
18
  plain/jobs/migrations/0003_rename_job_jobprocess_and_more.py,sha256=EdLucHxiH_QshLL2peIcMULRCQyFMPxh476AxCxW5Wk,2615
@@ -21,7 +21,7 @@ plain/jobs/migrations/0005_rename_constraints_and_indexes.py,sha256=PDGpOw6__tVf
21
21
  plain/jobs/migrations/0006_alter_jobprocess_table_alter_jobrequest_table_and_more.py,sha256=FY0_pcw0mL8MkUSatpDXWtA_xQw0kTZBGIyjLcmYeJE,546
22
22
  plain/jobs/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  plain/jobs/templates/admin/plainqueue/jobresult_detail.html,sha256=Ybp1s_dARo_bFDcLEzEfETheP8SzqHHE_NNSKhv_eh8,198
24
- plain_jobs-0.36.0.dist-info/METADATA,sha256=Irv5tmv2qiqwrhw9T8w152bUCFSZA8lIOnma-AlvB5Q,7162
25
- plain_jobs-0.36.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- plain_jobs-0.36.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
27
- plain_jobs-0.36.0.dist-info/RECORD,,
24
+ plain_jobs-0.36.2.dist-info/METADATA,sha256=sGER074rn4FofXat4ApF4UQK3G2In_Tl7J3-_zf_Br8,7162
25
+ plain_jobs-0.36.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ plain_jobs-0.36.2.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
27
+ plain_jobs-0.36.2.dist-info/RECORD,,