Skip to content

Commit

Permalink
Changes by create-pull-request action (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
blankdots committed Nov 29, 2022
2 parents 8b76928 + 5f9e46d commit 7c19f82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/services/mapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
The mapper service registers mapping of accessionIDs (stable ids for files) to datasetIDs.

## Service Description

The mapper service maps file accessionIDs to datasetIDs.

When running, mapper reads messages from the configured RabbitMQ queue (default: "mappings").
For each message, these steps are taken (if not otherwise noted, errors halt progress and the service moves on to the next message):

1. The message is validated as valid JSON that matches the "dataset-mapping" schema (defined in sda-common).
1. The message is validated as valid JSON that matches the "dataset-mapping" schema (defined in sda-common).
If the message can’t be validated it is discarded with an error message in the logs.

1. AccessionIDs from the message are mapped to a datasetID (also in the message) in the database.
On failure an error message is written to the logs, but processing is not halted.
On error the service sleeps for up to 5 minutes to allow for database recovery, after 5 minutes the message is Nacked, re-queued and an error message is written to the logs.

1. The RabbitMQ message is Ack'ed.

0 comments on commit 7c19f82

Please sign in to comment.