Skip to content

Commit 1c67f3e

Browse files
committed
feat: track pipeline priority in model
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent c4f3af6 commit 1c67f3e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

vulnerabilities/models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,10 @@ def requeue(self):
22622262
class PipelineSchedule(models.Model):
22632263
"""The Database representation of a pipeline schedule."""
22642264

2265+
class ExecutionPriority(models.IntegerChoices):
2266+
HIGH = 1, "high"
2267+
DEFAULT = 2, "default"
2268+
22652269
pipeline_id = models.CharField(
22662270
max_length=600,
22672271
help_text=("Identify a registered Pipeline class."),
@@ -2306,6 +2310,14 @@ class PipelineSchedule(models.Model):
23062310
help_text=("Number of hours to wait between run of this pipeline."),
23072311
)
23082312

2313+
run_priority = models.IntegerField(
2314+
null=False,
2315+
blank=False,
2316+
choices=ExecutionPriority.choices,
2317+
default=ExecutionPriority.DEFAULT,
2318+
help_text=("Select the pipeline execution priority"),
2319+
)
2320+
23092321
schedule_work_id = models.CharField(
23102322
max_length=255,
23112323
unique=True,

0 commit comments

Comments
 (0)