-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Task.immediate field and prioritize them on workers
* immediate prioritization This defines tasks of the type "immediate" by adding a Task.immediate(bool) field to the Task model. These type of task are ordered first in the worker's query to pick up a new available task. * misc This also adds a "deferred" field to the Task model, so we can later harden the constraint that 'deferred == False' and immediate == True' shouldn't get past the API level. This is possible today in some edge case failure scenarios on dispatch. Closes #5767
- Loading branch information
Showing
6 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Added a formal "immediate" type of Task and changed workers behavior to prioritize those. | ||
This labeling is exlusive to plugin code and should only be applied where it's known that | ||
the task will finish shortly, like in updates of repositories, remotes, and distributions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.16 on 2024-09-27 19:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0123_upstreampulp_q_select"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="task", | ||
name="immediate", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters