-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify task_timer table comments (#15241)
### Description Update `task_timer` table comments to aid future investigation into `TaskTimers`. Also added code comments at the top of the class to reference the wiki. Based on [Hunter's investigation](https://hackmd.io/@hschallh/HJ62FbTNP); motivated by [PendingIncompleteAndUncancelledTaskTimersChecker warnings](https://dsva.slack.com/archives/CJL810329/p1599828304030800). Prior comments were general from the perspective of `Asyncable` class. New comments provide more detail specific to `TaskTimers`. ### Acceptance Criteria - [ ] Code compiles correctly ### Testing Plan See Database Changes section below. ### Code Documentation Updates - [x] Add or update code comments at the top of the class, module, and/or component. ### Database Changes *Only for Schema Changes* * [ ] ~Timestamps (created_at, updated_at) for new tables~ * [x] Column comments updated * [x] Have your migration classes inherit from `Caseflow::Migration`, especially when adding indexes (use `add_safe_index`) * [x] Verify that `migrate:rollback` works as desired ([`change` supported functions](https://edgeguides.rubyonrails.org/active_record_migrations.html#using-the-change-method)) * [ ] ~Query profiling performed (eyeball Rails log, check bullet and fasterer output)~ * [ ] ~Appropriate indexes added (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)~ * [x] DB schema docs updated with `make docs` (after running `make migrate`) * [x] #appeals-schema notified with summary and link to this PR
- Loading branch information
Showing
6 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class EditTaskTimersComments < Caseflow::Migration | ||
def up | ||
change_table_comment :task_timers, "A task timer allows an associated task's (like EvidenceSubmissionWindowTask and TimedHoldTask) `when_timer_ends` method to be run asynchronously after timer expires." | ||
change_column_comment :task_timers, :attempted_at, "Async timestamp for most recent attempt to run Task#when_timer_ends." | ||
change_column_comment :task_timers, :canceled_at, "Timestamp when job was abandoned. Associated task is typically cancelled." | ||
change_column_comment :task_timers, :last_submitted_at, "Async timestamp for most recent job start. Initially set to when timer should expire (Task#timer_ends_at)." | ||
change_column_comment :task_timers, :processed_at, "Async timestamp for when the job completes successfully. Associated task's method Task#when_timer_ends ran successfully." | ||
change_column_comment :task_timers, :task_id, "ID of the associated Task to be run." | ||
end | ||
def down | ||
change_table_comment :task_timers, "Task timers allow tasks to be run asynchronously after some future date, like EvidenceSubmissionWindowTask." | ||
change_column_comment :task_timers, :attempted_at, "Async timestamp for most recent attempt to run." | ||
change_column_comment :task_timers, :canceled_at, "Timestamp when job was abandoned" | ||
change_column_comment :task_timers, :last_submitted_at, "Async timestamp for most recent job start." | ||
change_column_comment :task_timers, :processed_at, "Async timestamp for when the job completes successfully." | ||
change_column_comment :task_timers, :task_id, "ID of the Task to be run." | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters