Skip to content

Commit

Permalink
add 0025 migration. access jobs prop from body
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Oct 11, 2023
1 parent bae1160 commit f8116e9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.1.2 on 2023-10-11 01:01

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('backend', '0024_pipeline_uses'),
]

operations = [
migrations.AddField(
model_name='pipeline',
name='description',
field=models.TextField(null=True),
),
migrations.AddField(
model_name='task',
name='entrypoint',
field=models.TextField(null=True),
),
]
5 changes: 2 additions & 3 deletions src/api/src/backend/views/ETLPipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def post(self, request, group_id, *_, **__):
return BadRequest(message=e.__cause__)
except Exception as e:
return ServerErrorResp(f"{e}")
print("AFTER PIPELINE CREATE")

# Fetch the archives specified in the request then create relations
# between them and the pipline
Expand Down Expand Up @@ -213,13 +212,13 @@ def post(self, request, group_id, *_, **__):
# Delete the pipeline archive relationships that were just created
[pipeline_archive.delete() for pipeline_archive in pipeline_archives]
return BadRequest(message=e.__cause__)
print("AFTER ARCHIVE CREATE")

# The first tapis job should be dependent on the gen-inbound-manifests task
last_task_id = "gen-inbound-manifests"

# Create a tapis job task for each job provided in the request.
tasks = []
for i, job in enumerate(request.jobs, start=1):
for i, job in enumerate(body.jobs, start=1):
task_id = f"etl-job-{i}"
tasks.append(
TapisJobTask({
Expand Down

0 comments on commit f8116e9

Please sign in to comment.