Introduced task priority (#6118)

### What problem does this PR solve?

Introduced task priority

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Zhichang Yu
2025-03-14 23:43:46 +08:00
committed by GitHub
parent 1842ca0334
commit 89a69eed72
9 changed files with 59 additions and 42 deletions

View File

@ -845,6 +845,7 @@ class Task(DataBaseModel):
from_page = IntegerField(default=0)
to_page = IntegerField(default=100000000)
task_type = CharField(max_length=32, null=False, default="")
priority = IntegerField(default=0)
begin_at = DateTimeField(null=True, index=True)
process_duation = FloatField(default=0)
@ -1122,3 +1123,10 @@ def migrate_db():
)
except Exception:
pass
try:
migrate(
migrator.add_column("task", "priority",
IntegerField(default=0))
)
except Exception:
pass