Skip to content

Commit

Permalink
fix public-api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Mar 21, 2023
1 parent 53afe47 commit 52348da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ async def create_job(

# -> director2: ComputationTaskOut = JobStatus
# consistency check
task: ComputationTaskGet = await director2_api.create_computation(job.id, user_id)
task: ComputationTaskGet = await director2_api.create_computation(
job.id, user_id, product_name
)
assert task.id == job.id # nosec

job_status: JobStatus = create_jobstatus_from_task(task)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,18 @@ class DirectorV2Api(BaseServiceClientApi):
# ServiceUnabalabe: 503

async def create_computation(
self, project_id: UUID, user_id: PositiveInt
self,
project_id: UUID,
user_id: PositiveInt,
product_name: str,
) -> ComputationTaskGet:
resp = await self.client.post(
"/v2/computations",
json={
"user_id": user_id,
"project_id": str(project_id),
"start_pipeline": False,
"product_name": product_name,
},
)

Expand Down

0 comments on commit 52348da

Please sign in to comment.