diff --git a/docs/api/use-cases.rst b/docs/api/use-cases.rst --- a/docs/api/use-cases.rst +++ b/docs/api/use-cases.rst @@ -95,7 +95,10 @@ b. Server stores information received (metadata or software archive source code or both). -4. The server notifies the client it acknowledged the client's request. An +4. The server creates a loading task and submits it to the + :ref:`Job Scheduler ` + +5. The server notifies the client it acknowledged the client's request. An ``http 201 Created`` response with a deposit receipt in the body response is sent back. That deposit receipt will hold the necessary information to eventually complete the deposit later on if it was incomplete (also known as @@ -113,7 +116,7 @@ Updating an existing deposit """""""""""""""""""""""""""" -5. Client updates existing deposit through the *update uris* (one or more POST +6. Client updates existing deposit through the *update uris* (one or more POST or PUT requests to either the *edit-media iri* or *edit iri*). 1. Server validates the client's input or returns detailed error if any @@ -151,7 +154,7 @@ Deleting deposit (or associated archive, or associated metadata) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -6. Deposit deletion is possible as long as the deposit is still in ``partial`` +7. Deposit deletion is possible as long as the deposit is still in ``partial`` state. 1. Server validates the client's input or returns detailed error if any @@ -170,7 +173,7 @@ Client asks for operation status """""""""""""""""""""""""""""""" -7. Operation status can be read through a GET query to the *state iri*. +8. Operation status can be read through a GET query to the *state iri*. Server: Triggering deposit checks diff --git a/docs/images/deposit-create-chart.uml b/docs/images/deposit-create-chart.uml --- a/docs/images/deposit-create-chart.uml +++ b/docs/images/deposit-create-chart.uml @@ -2,10 +2,12 @@ participant CLIENT as "SWORD client\n(eg. HAL)" participant DEPOSIT as "swh-deposit" participant DEPOSIT_DATABASE as "deposit database" + participant SCHEDULER as "swh-scheduler" activate CLIENT activate DEPOSIT activate DEPOSIT_DATABASE + activate SCHEDULER CLIENT ->> DEPOSIT: GET /1// @@ -22,5 +24,7 @@ DEPOSIT ->> DEPOSIT_DATABASE: create new deposit DEPOSIT_DATABASE -->> DEPOSIT: return deposit_id + DEPOSIT ->> SCHEDULER: schedule load for + DEPOSIT -->> CLIENT: return 201, @enduml diff --git a/docs/images/deposit-update-chart.uml b/docs/images/deposit-update-chart.uml --- a/docs/images/deposit-update-chart.uml +++ b/docs/images/deposit-update-chart.uml @@ -2,10 +2,12 @@ participant CLIENT as "SWORD client\n(eg. HAL)" participant DEPOSIT as "swh-deposit" participant DEPOSIT_DATABASE as "deposit database" + participant SCHEDULER as "swh-scheduler" activate CLIENT activate DEPOSIT activate DEPOSIT_DATABASE + activate SCHEDULER CLIENT ->> DEPOSIT: POST /1//\nHEADER In-Progress: true @@ -27,6 +29,7 @@ alt HEADER: In-Progress = true DEPOSIT ->> DEPOSIT_DATABASE: add-or-replace-data-and-update-status('partial') else HEADER: In-Progress = false + DEPOSIT ->> SCHEDULER: schedule load for DEPOSIT ->> DEPOSIT_DATABASE: add-or-replace-data-and-update-status('deposited') end DEPOSIT_DATABASE -->> DEPOSIT: return ok