Disable recording of time_spent while we convert current records from milliseconds to seconds #36380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR temporarily disables recording of time_spent to the user_levels table. (PR That implemented: #36121)
Given that the mysql limit for an integer is 2,147,483,648 (roughly 25 days when measured in milliseconds), we realized we needed capacity for longer periods of time to be recorded in the time_spent field. It is reasonable to expect a student may spent more than 25 days of total time on a long-term project. Additionally, we continue recording time_spent if the student leaves their browser window open but is not actively working on their computer, which could also increase the time a student spends on their project.
time_spent is currently recording milliseconds. Intervals of time less than one second are not useful for these purposes. Instead, we will record seconds. This will give us capacity to record over 68 years of time_spent on a user_level.
To migrate to recording seconds, we need to take two actions.
a. Stop recording time_spent
b. Migrate all existing records from milliseconds to seconds
c. Re-enable recording time_spent
This PR achieves steps 1 and 2a
Internal folks can read more details in this slack thread.
Links
Testing story
Reviewer Checklist: