From 4f2b3fbb433d80a2bc7dece1a058ccf3ed11d13c Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Mon, 18 Dec 2023 17:44:59 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/migrations/0023_auto_20220912_0021.py | 17 ++++++++++------- .../0024_alter_celerytask_date_last_publish.py | 5 +++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/ops/migrations/0023_auto_20220912_0021.py b/apps/ops/migrations/0023_auto_20220912_0021.py index 0fc0de0ba..a55ba48f1 100644 --- a/apps/ops/migrations/0023_auto_20220912_0021.py +++ b/apps/ops/migrations/0023_auto_20220912_0021.py @@ -1,12 +1,13 @@ # Generated by Django 3.2.14 on 2022-12-28 10:03 +import uuid + +import django.db.models.deletion import private_storage.fields import private_storage.storage.files +import simple_history.models from django.conf import settings from django.db import migrations, models -import django.db.models.deletion -import simple_history.models -import uuid class Migration(migrations.Migration): @@ -70,8 +71,9 @@ class Migration(migrations.Migration): default='shell', max_length=128, null=True, verbose_name='Module')), ('chdir', models.CharField(blank=True, default='', max_length=1024, null=True, verbose_name='Chdir')), ('timeout', models.IntegerField(default=-1, verbose_name='Timeout (Seconds)')), - ('type', models.CharField(choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook')], default='adhoc', - max_length=128, verbose_name='Type')), + ('type', models.CharField( + choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook'), ('upload_file', 'Upload File')], + default='adhoc', max_length=128, verbose_name='Type')), ('runas', models.CharField(default='root', max_length=128, verbose_name='Runas')), ('runas_policy', models.CharField( choices=[('privileged_only', 'Privileged Only'), ('privileged_first', 'Privileged First'), @@ -173,8 +175,9 @@ class Migration(migrations.Migration): default='shell', max_length=128, null=True, verbose_name='Module')), ('chdir', models.CharField(blank=True, default='', max_length=1024, null=True, verbose_name='Chdir')), ('timeout', models.IntegerField(default=-1, verbose_name='Timeout (Seconds)')), - ('type', models.CharField(choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook')], default='adhoc', - max_length=128, verbose_name='Type')), + ('type', models.CharField( + choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook'), ('upload_file', 'Upload File')], + default='adhoc', max_length=128, verbose_name='Type')), ('runas', models.CharField(default='root', max_length=128, verbose_name='Runas')), ('runas_policy', models.CharField( choices=[('privileged_only', 'Privileged Only'), ('privileged_first', 'Privileged First'), diff --git a/apps/ops/migrations/0024_alter_celerytask_date_last_publish.py b/apps/ops/migrations/0024_alter_celerytask_date_last_publish.py index 26c5d2cd7..3b7192f60 100644 --- a/apps/ops/migrations/0024_alter_celerytask_date_last_publish.py +++ b/apps/ops/migrations/0024_alter_celerytask_date_last_publish.py @@ -56,8 +56,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name='jobexecution', name='job_type', - field=models.CharField(choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook')], default='adhoc', - max_length=128, verbose_name='Material Type'), + field=models.CharField( + choices=[('adhoc', 'Adhoc'), ('playbook', 'Playbook'), ('upload_file', 'Upload File')], + default='adhoc', max_length=128, verbose_name='Material Type'), ), migrations.AddField( model_name='jobexecution',