Skip to content

Commit

Permalink
CORE-1997 Replace /callbacks/agave-job with /callbacks/tapis-job
Browse files Browse the repository at this point in the history
  • Loading branch information
psarando committed Aug 27, 2024
1 parent 5cc5594 commit 90ee21c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
[org.cyverse/cyverse-groups-client "0.1.9"]
[org.cyverse/common-cfg "2.8.3"]
[org.cyverse/common-cli "2.8.2"]
[org.cyverse/common-swagger-api "3.4.5"]
[org.cyverse/common-swagger-api "3.4.6-SNAPSHOT"]
[org.cyverse/kameleon "3.0.10"
:exclusion [com.impossibl.pgjdbc-ng/pgjdbc-ng]]
[com.impossibl.pgjdbc-ng/pgjdbc-ng "0.8.9"]
Expand Down
9 changes: 4 additions & 5 deletions src/terrain/clients/apps/raw.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1451,11 +1451,10 @@
{:query-params (secured-params)
:as :json}))))

(defn update-agave-job-status
[job-id body params]
(:body (client/post (apps-url "callbacks" "agave-job" job-id)
(defn update-tapis-job-status
[job-id body]
(:body (client/post (apps-url "callbacks" "tapis-job" job-id)
(disable-redirects
{:query-params params
:form-params body
{:form-params body
:content-type :json
:as :json}))))
21 changes: 10 additions & 11 deletions src/terrain/routes/callbacks.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns terrain.routes.callbacks
(:use [common-swagger-api.schema]
[common-swagger-api.schema.analyses :only [AnalysisIdPathParam]]
[common-swagger-api.schema.callbacks :only [AgaveJobStatusUpdateParams AgaveJobStatusUpdate]]
[common-swagger-api.schema.callbacks :only [TapisJobStatusUpdate]]
[ring.util.http-response :only [ok]]
[terrain.util])
(:require [terrain.clients.apps.raw :as apps]
Expand All @@ -11,15 +11,14 @@
"Routes for making calls back into the DE web services."
[]
(optional-routes
[config/app-routes-enabled]
[config/app-routes-enabled]

(context "/callbacks" []
:tags ["callbacks"]
(context "/callbacks" []
:tags ["callbacks"]

(POST "/agave-job/:job-id" []
:path-params [job-id :- AnalysisIdPathParam]
:body [body (describe AgaveJobStatusUpdate "The updated job status information.")]
:query [params AgaveJobStatusUpdateParams]
:summary "Update the status of an Agave analysis."
:description "The DE registers this endpoint as a callback when it submts jobs to Agave."
(ok (apps/update-agave-job-status job-id body params))))))
(POST "/tapis-job/:job-id" []
:path-params [job-id :- AnalysisIdPathParam]
:body [body (describe TapisJobStatusUpdate "The updated job status information.")]
:summary "Update the status of a Tapis analysis."
:description "The DE registers this endpoint as a callback when it submits jobs to Tapis."
(ok (apps/update-tapis-job-status job-id body))))))

0 comments on commit 90ee21c

Please sign in to comment.