-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Data rearchitecture] Handle changes in timeslice durations #6077
Merged
gabina
merged 18 commits into
WikiEducationFoundation:data-rearchitecture-for-dashboard
from
gabina:data-rearchitecture-handle-timeslice-durations
Dec 27, 2024
Merged
[Data rearchitecture] Handle changes in timeslice durations #6077
gabina
merged 18 commits into
WikiEducationFoundation:data-rearchitecture-for-dashboard
from
gabina:data-rearchitecture-handle-timeslice-durations
Dec 27, 2024
Conversation
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
…of timeslices. Instead of that, we only create timeslices for non-empty course user wiki timeslices.
…erent timeslice durations for different wikis.
…icesCourseWiki class. Add basic specs for it
gabina
changed the title
[WIP] [Data rearchitecture] Handle changes in timeslice durations
[Data rearchitecture] Handle changes in timeslice durations
Dec 27, 2024
gabina
merged commit Dec 27, 2024
1b48535
into
WikiEducationFoundation:data-rearchitecture-for-dashboard
1 check passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does
This PR adds functionality to change the timeslice duration for a given course. The timeslice duration works at course wiki level as we may want to set different timeslice durations for different wikis within the same course.
There is a new
TIMESLICE_DURATION
env variable to set the default timeslice duration. In addition, a course may have atimeslice_duration
flag to specify timeslice durations for wikis. The flag looks as follows:Lengths are measured in seconds (e.g., 86400 seconds = 1 day, 43200 seconds = 12 hours, 864000 seconds = 10 days).
wiki.domain
), that value is used for the corresponding wiki.default
value is applied.timeslice_duration
flag is not provided for the course, theTIMESLICE_DURATION
environment variable is used.As part of the changes, this PR also stops creating the complete universe of timeslices for course user wiki. That means that we only create a course user wiki timeslice when we found some revisions for that course user wiki in the given period of time. Note that the timeslice could still be empty (
revision_count
set to 0) because we only consider live revisions (revisions for tracked article courses for which already exists an article record). SeeCourseUserWikiTimeslice.update_cache_from_revisions
. This refactor was addressed in this PR for simplicity reasons.Open questions and concerns
An admin view to easily get and update the timeslice duration for a course will be created in the future. For now, only manual updates are supported (in the
flag
field).