From c675d0af041d49c6c6370c7dae27c578216ca3e2 Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Mon, 2 Oct 2023 12:47:10 -0500 Subject: [PATCH] remove debug. Add uses model --- .../backend/migrations/0021_remove_task__if.py | 17 +++++++++++++++++ src/api/src/backend/models.py | 1 + src/api/src/backend/views/http/requests.py | 1 + src/api/src/scripts/init.sh | 2 -- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/api/src/backend/migrations/0021_remove_task__if.py diff --git a/src/api/src/backend/migrations/0021_remove_task__if.py b/src/api/src/backend/migrations/0021_remove_task__if.py new file mode 100644 index 00000000..6f8d3308 --- /dev/null +++ b/src/api/src/backend/migrations/0021_remove_task__if.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.2 on 2023-10-02 17:18 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('backend', '0020_taskexecution_stderr_taskexecution_stdout'), + ] + + operations = [ + migrations.RemoveField( + model_name='task', + name='_if', + ), + ] diff --git a/src/api/src/backend/models.py b/src/api/src/backend/models.py index ebf2e84e..0ee57879 100644 --- a/src/api/src/backend/models.py +++ b/src/api/src/backend/models.py @@ -446,6 +446,7 @@ class Meta: poll = models.BooleanField(null=True) retry_policy = models.CharField(max_length=32, default=EnumRetryPolicy.ExponentialBackoff) type = models.CharField(max_length=32, choices=TASK_TYPES) + uses = models.JSONField(null=True) uuid = models.UUIDField(primary_key=True, default=uuid.uuid4) # Image build specific properties diff --git a/src/api/src/backend/views/http/requests.py b/src/api/src/backend/views/http/requests.py index 6577cab8..0ead151e 100644 --- a/src/api/src/backend/views/http/requests.py +++ b/src/api/src/backend/views/http/requests.py @@ -509,6 +509,7 @@ class BaseTask(BaseModel): description: str = None execution_profile: TaskExecutionProfile = TaskExecutionProfile() input: Dict[str, TaskInputValue] = {} + _if: str = None output: Dict[str, BaseOutputValue] = {} class Config: diff --git a/src/api/src/scripts/init.sh b/src/api/src/scripts/init.sh index 3e363099..a412ec0e 100644 --- a/src/api/src/scripts/init.sh +++ b/src/api/src/scripts/init.sh @@ -9,9 +9,7 @@ python backend/setup.py # Migrates the db schema chmod a+x ./scripts/migrate.sh -echo "BEFORE MIGRATE" ./scripts/migrate.sh -echo "AFTER MIGRATE" # Uses the envrionment variables to resolve superuser username, # password, and email