Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for celery to return response to request to solve specification #913

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pydantic
import yaml

from celery.result import AsyncResult
from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request
from fastapi.responses import PlainTextResponse, RedirectResponse

Expand Down Expand Up @@ -844,13 +845,13 @@ async def api_get_specification(

try:
task, solve_id = conda_store.register_solve(db, specification)
task.wait()
AsyncResult(task).wait()
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e.args[0]))

solve = api.get_solve(db, solve_id)

return {"solve": solve.packages}
return {"solve": solve.package_builds}


@router_api.post(
Expand Down
Loading