Handle EvidenceSubmissionWindowTasks with last_submitted_at edge cases #15245
Labels
Feature: generic-queue
Priority: Medium
Blocking issue w/workaround, or "second in" priority for new work.
Product: caseflow-queue
Stakeholder: BVA
Functionality associated with the Board of Veterans' Appeals workflows/feature requests
Team: Echo 🐬
Type: Tech-Improvement
Description
On occasion, we receive an alert that there are task timers that should have been completed but have not been processed. Sometimes this is due to the fact that the "when a task timer should be completed" timestamp is calculated to be before the task is actually created. If this date difference is greater than 4 days, our task timer job will ignore the task timer and not attempt to complete it. See investigation here for details. TL/DR, when the task timer job looks for task timer to handle, it uses the "unexpired" scope, which filters out any task that should have been completed over 4 days ago.
To remedy this, upon creation, we check to see if the task completion date is outside of the 4 day window, and immediately reset the "should be completed" timestamp so it can be picked up by the next job.
The issue lies in a very tight edge case where a task is created with a
last_submitted_at
timestamp within the 4 day window when it is created, but by the time the next job is run, the timestamp has slipped outside of the window. When last investigating this, we saw 10 of these edge cases occur in less than a month, some missing the cutoff by only 4 minutesAC
The text was updated successfully, but these errors were encountered: