-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add domain and task argument support to TaskSchedule. #5779
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added domain and task arguments when using TaskSchedule to run a task. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.16 on 2024-09-09 16:27 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0122_record_last_replication_timestamp'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='taskschedule', | ||
name='pulp_domain', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.domain'), | ||
), | ||
migrations.AddField( | ||
model_name='taskschedule', | ||
name='task_args', | ||
field=models.TextField(null=True), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
from pulpcore.app.models import ( | ||
AutoAddObjPermsMixin, | ||
BaseModel, | ||
Domain, | ||
GenericRelationModel, | ||
) | ||
from pulpcore.app.models.status import BaseAppStatus | ||
|
@@ -371,6 +372,8 @@ class TaskSchedule(BaseModel): | |
dispatch_interval = models.DurationField(null=True) | ||
task_name = models.TextField() | ||
last_task = models.ForeignKey(Task, null=True, on_delete=models.SET_NULL) | ||
pulp_domain = models.ForeignKey(Domain, null=True, on_delete=models.CASCADE) | ||
task_args = models.TextField(null=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we use here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great idea. Gonna work on that. |
||
|
||
class Meta: | ||
permissions = [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.