From d865105528c29a50521940e0860a2ec35ebf7d33 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Thu, 25 Jan 2024 16:02:38 -0800 Subject: [PATCH] Update states.md --- design/queue-2023/states.md | 105 +++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git a/design/queue-2023/states.md b/design/queue-2023/states.md index 21d8672..7b90112 100644 --- a/design/queue-2023/states.md +++ b/design/queue-2023/states.md @@ -84,7 +84,7 @@ - UpdateReporting --> Completed - detect any updated statuses and report them - status = Completed -- Processing_Resumed --> Failed +- UpdateReporting --> Failed - detect any updated statuses and report them - status = Completed - Failed --> Deleted (admin function) @@ -240,6 +240,107 @@ - reset status - Failed --> Deleted (admin function) -## TODO +## Use Cases + +### Successful Batch +- User submits manifest with 3 items +- Batch downloads manifest and creates 3 jobs + - Batch: Processing + - Job 1: Pending + - Job 2: Pending + - Job 3: Pending +- Job 2 completes + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Pending +- Job 3 completes + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Complete +- Job 1 completes + - Batch: Processing + - Job 1: Complete + - Job 2: Complete + - Job 3: Complete +- Batch goes to Reporting State + - Batch: Reporting + - success email sent to depositor +- Batch goes to Completed State + - document key use cases - esp retry logic + +### Failed Batch +- User submits manifest with 3 items +- Batch downloads manifest and creates 3 jobs + - Batch: Processing + - Job 1: Pending + - Job 2: Pending + - Job 3: Pending +- Job 2 completes + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Pending +- Job 3 fails + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Failed +- Job 1 completed + - Batch: Processing + - Job 1: Complete + - Job 2: Complete + - Job 3: Failed +- Batch goes to Reporting State + - Batch: Reporting + - failed email sent to depositor +- Batch goes to Failed State + +### Failed Batch with Retry +- User submits manifest with 3 items +- Batch downloads manifest and creates 3 jobs + - Batch: Processing + - Job 1: Pending + - Job 2: Pending + - Job 3: Pending +- Job 2 completes + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Pending +- Job 3 fails + - Batch: Processing + - Job 1: Pending + - Job 2: Complete + - Job 3: Failed +- Job 1 completed + - Batch: Processing + - Job 1: Complete + - Job 2: Complete + - Job 3: Failed +- Batch goes to Reporting State + - Batch: Reporting + - failed email sent to depositor +- Batch goes to Failed State + - Batch: Failed + - Job 1: Complete + - Job 2: Complete + - Job 3: Failed +- Job 3 restarted + - Batch: Failed + - Job 1: Complete + - Job 2: Complete + - Job 3: Processing* +- Job 3 completes + - Batch: Failed + - Job 1: Complete + - Job 2: Complete + - Job 3: Complete* +- Batch set to UpdateReporting + - Batch: UpdateReporting + - email update to depositor to reflect change in Job 3 status +- Batch set to Complete + - Complete