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/migrations/0007_remove_jobrequest_plainjobs_jobrequest_unique_job_class_key_and_more.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Generated by Plain 0.85.0 on 2025-11-09 03:07
|
|
2
|
+
|
|
3
|
+
from plain import models
|
|
4
|
+
from plain.models import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("plainjobs", "0006_alter_jobprocess_table_alter_jobrequest_table_and_more"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.RemoveConstraint(
|
|
14
|
+
model_name="jobrequest",
|
|
15
|
+
name="plainjobs_jobrequest_unique_job_class_key",
|
|
16
|
+
),
|
|
17
|
+
migrations.RemoveIndex(
|
|
18
|
+
model_name="jobprocess",
|
|
19
|
+
name="plainjobs_j_unique__67172c_idx",
|
|
20
|
+
),
|
|
21
|
+
migrations.RemoveIndex(
|
|
22
|
+
model_name="jobprocess",
|
|
23
|
+
name="job_class_unique_key",
|
|
24
|
+
),
|
|
25
|
+
migrations.RemoveIndex(
|
|
26
|
+
model_name="jobrequest",
|
|
27
|
+
name="plainjobs_j_unique__42f6a6_idx",
|
|
28
|
+
),
|
|
29
|
+
migrations.RemoveIndex(
|
|
30
|
+
model_name="jobrequest",
|
|
31
|
+
name="job_request_class_unique_key",
|
|
32
|
+
),
|
|
33
|
+
migrations.RenameField(
|
|
34
|
+
model_name="jobprocess",
|
|
35
|
+
old_name="unique_key",
|
|
36
|
+
new_name="concurrency_key",
|
|
37
|
+
),
|
|
38
|
+
migrations.RenameField(
|
|
39
|
+
model_name="jobrequest",
|
|
40
|
+
old_name="unique_key",
|
|
41
|
+
new_name="concurrency_key",
|
|
42
|
+
),
|
|
43
|
+
migrations.RenameField(
|
|
44
|
+
model_name="jobresult",
|
|
45
|
+
old_name="unique_key",
|
|
46
|
+
new_name="concurrency_key",
|
|
47
|
+
),
|
|
48
|
+
migrations.AlterField(
|
|
49
|
+
model_name="jobprocess",
|
|
50
|
+
name="priority",
|
|
51
|
+
field=models.SmallIntegerField(default=0),
|
|
52
|
+
),
|
|
53
|
+
migrations.AlterField(
|
|
54
|
+
model_name="jobprocess",
|
|
55
|
+
name="retries",
|
|
56
|
+
field=models.SmallIntegerField(default=0),
|
|
57
|
+
),
|
|
58
|
+
migrations.AlterField(
|
|
59
|
+
model_name="jobprocess",
|
|
60
|
+
name="retry_attempt",
|
|
61
|
+
field=models.SmallIntegerField(default=0),
|
|
62
|
+
),
|
|
63
|
+
migrations.AlterField(
|
|
64
|
+
model_name="jobrequest",
|
|
65
|
+
name="priority",
|
|
66
|
+
field=models.SmallIntegerField(default=0),
|
|
67
|
+
),
|
|
68
|
+
migrations.AlterField(
|
|
69
|
+
model_name="jobrequest",
|
|
70
|
+
name="retries",
|
|
71
|
+
field=models.SmallIntegerField(default=0),
|
|
72
|
+
),
|
|
73
|
+
migrations.AlterField(
|
|
74
|
+
model_name="jobrequest",
|
|
75
|
+
name="retry_attempt",
|
|
76
|
+
field=models.SmallIntegerField(default=0),
|
|
77
|
+
),
|
|
78
|
+
migrations.AlterField(
|
|
79
|
+
model_name="jobresult",
|
|
80
|
+
name="priority",
|
|
81
|
+
field=models.SmallIntegerField(default=0),
|
|
82
|
+
),
|
|
83
|
+
migrations.AlterField(
|
|
84
|
+
model_name="jobresult",
|
|
85
|
+
name="retries",
|
|
86
|
+
field=models.SmallIntegerField(default=0),
|
|
87
|
+
),
|
|
88
|
+
migrations.AlterField(
|
|
89
|
+
model_name="jobresult",
|
|
90
|
+
name="retry_attempt",
|
|
91
|
+
field=models.SmallIntegerField(default=0),
|
|
92
|
+
),
|
|
93
|
+
migrations.AlterField(
|
|
94
|
+
model_name="jobresult",
|
|
95
|
+
name="status",
|
|
96
|
+
field=models.CharField(
|
|
97
|
+
choices=[
|
|
98
|
+
("SUCCESSFUL", "Successful"),
|
|
99
|
+
("ERRORED", "Errored"),
|
|
100
|
+
("CANCELLED", "Cancelled"),
|
|
101
|
+
("DEFERRED", "Deferred"),
|
|
102
|
+
("LOST", "Lost"),
|
|
103
|
+
],
|
|
104
|
+
max_length=20,
|
|
105
|
+
),
|
|
106
|
+
),
|
|
107
|
+
migrations.AddIndex(
|
|
108
|
+
model_name="jobprocess",
|
|
109
|
+
index=models.Index(
|
|
110
|
+
fields=["concurrency_key"], name="plainjobs_j_concurr_ad4464_idx"
|
|
111
|
+
),
|
|
112
|
+
),
|
|
113
|
+
migrations.AddIndex(
|
|
114
|
+
model_name="jobprocess",
|
|
115
|
+
index=models.Index(fields=["uuid"], name="plainjobs_j_uuid_cd8cd3_idx"),
|
|
116
|
+
),
|
|
117
|
+
migrations.AddIndex(
|
|
118
|
+
model_name="jobprocess",
|
|
119
|
+
index=models.Index(
|
|
120
|
+
fields=["job_class", "concurrency_key"], name="job_concurrency_key"
|
|
121
|
+
),
|
|
122
|
+
),
|
|
123
|
+
migrations.AddIndex(
|
|
124
|
+
model_name="jobrequest",
|
|
125
|
+
index=models.Index(
|
|
126
|
+
fields=["concurrency_key"], name="plainjobs_j_concurr_c10926_idx"
|
|
127
|
+
),
|
|
128
|
+
),
|
|
129
|
+
migrations.AddIndex(
|
|
130
|
+
model_name="jobrequest",
|
|
131
|
+
index=models.Index(fields=["uuid"], name="plainjobs_j_uuid_c41c85_idx"),
|
|
132
|
+
),
|
|
133
|
+
migrations.AddIndex(
|
|
134
|
+
model_name="jobrequest",
|
|
135
|
+
index=models.Index(
|
|
136
|
+
fields=["job_class", "concurrency_key"],
|
|
137
|
+
name="job_request_concurrency_key",
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
migrations.AddIndex(
|
|
141
|
+
model_name="jobresult",
|
|
142
|
+
index=models.Index(fields=["uuid"], name="plainjobs_j_uuid_b33b4c_idx"),
|
|
143
|
+
),
|
|
144
|
+
]
|
|
File without changes
|