Skip to content

Commit

Permalink
use async task for publication
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosenb committed May 13, 2024
1 parent 1275b7b commit ce596f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions designsafe/apps/api/publications_v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from designsafe.apps.api.publications_v2.models import Publication
from designsafe.apps.api.projects_v2.models.project_metadata import ProjectMetadata
from designsafe.apps.api.projects_v2.operations.project_publish_operations import (
publish_project,
publish_project_async,
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -81,7 +81,7 @@ def post(self, request: HttpRequest):
"User does not have access to the requested project", status=403
) from exc

publish_project(project_id, entities_to_publish, dry_run=False)
publish_project_async.apply_async([project_id, entities_to_publish])
logger.debug(project_id)
logger.debug(entities_to_publish)
return JsonResponse({"result": "OK"})

0 comments on commit ce596f4

Please sign in to comment.