Skip to content

Resolve "Add ewoks end points"

Alejandro De Maria Antolinos requested to merge 438-add-ewoks-end-points into master

Closes #438 (closed)

@denolf @svensson

Endpoints

Ewoks endpoints have been implemented in order to interface data portal with ewoks: image

Calback

In order to monitor the status and get extra information during analysis time a callback has been added as input parameter: Example:

 {
      execute_arguments: {
        engine: workflowResponse.data.graph.engine,
        {
             .....
             callback : "https://icatplus.esrf.fr/ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d"
        },
        _slurm_spawn_arguments,
      },
      worker_options: {
        queue,
      },
    },

The back receives as path parameters the sessionId, which allows authentication, and the _id. Take into account that is NOT the job_id of ewoks.

Parameters

As body params it accepts: status, step and logs. status and step are string and logs is an Object

  1. status: it could be an enumeration, which is probably on ewoks or free text. For me, it represents the status of the pipeline and should be the same values for all the workflows. Something like: PENDING, SCHEDULED, STARTED, RUNNING, FINISHED
  2. step: more controversial, for me it could be use to indicate the current analysis stage. A workflow composed by a single task which does everything could to indicate what it is currently doing: "uncompressing", "integrating", "copying", "calculating phasing", etc...
  3. logs: it allows to persist any sort of object. A numeric table or a string.

Example:

PUT(.../ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d, { status: "STARTED" })
PUT(.../ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d,  { logs: { message: "Starting the process" } })
PUT(.../ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d, { status: "RUNNING", step: "INTEGRATION" })
PUT(.../ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d, { step: "PHASING" })
PUT(.../ewoks/d5275ec1-2215-49cc-932f-e9baa7a02245/jobs?id=65165907ff18055bfab08e5d, { status: "FINISHED", logs: { message: "Processed successfully. The answer to life is 42" } })
Edited by Alejandro De Maria Antolinos

Merge request reports