forked from chrisspen/django-chroniker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CallbackMethod to allow setting custom methods per job
- Loading branch information
1 parent
01d8966
commit f60ac48
Showing
3 changed files
with
87 additions
and
5 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
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,36 @@ | ||
# Generated by Django 3.2.23 on 2024-04-03 16:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('chroniker', '0003_auto_20200822_2026'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CallbackMethod', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=200, verbose_name='name')), | ||
('reference', models.CharField(max_length=200, verbose_name='reference')), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='job', | ||
name='callback_errors_to_subscribers', | ||
field=models.BooleanField(default=True, help_text='If checked, the stdout and stderr of a job will be sent to the callback if an error occur.'), | ||
), | ||
migrations.AddField( | ||
model_name='job', | ||
name='callback_success_to_subscribers', | ||
field=models.BooleanField(default=False, help_text='If checked, the stdout of a job will be sent to the callback if not errors occur.'), | ||
), | ||
migrations.AddField( | ||
model_name='job', | ||
name='callbacks', | ||
field=models.ManyToManyField(blank=True, related_name='callbacked_jobs', to='chroniker.CallbackMethod'), | ||
), | ||
] |
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