Skip to content
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

Grace period logic needs tidying #15

Open
sersorrel opened this issue Aug 9, 2019 · 0 comments
Open

Grace period logic needs tidying #15

sersorrel opened this issue Aug 9, 2019 · 0 comments

Comments

@sersorrel
Copy link
Contributor

The logic around project uploads, the grace period, etc. is in need of some looking at.

For example, the time left for each student to reupload their project is determined by looking up the time at which the job to end the grace period will run:

job = scheduler.get_job(f"grace_deadline_{project.id}")
grace_time = None
if job:
grace_time = job.next_run_time.strftime('%Y-%m-%d %H:%M')

and whilst there's nothing actually wrong with this (in normal use, the grace_deadline job sets a flag that prevents the frontend from querying this API endpoint), it would be a lot nicer if the calculation of "when should the grace period end" was separated from the actual action of scheduling the job to end it.

It also looks like there has been some miscommunication and/or indecision about how the grace period should actually work, as there's a lot of copy in the frontend about having 3 days after you upload the project to reupload it, whereas the backend schedules the grace_deadline job for either 1 or 3 days after the final upload deadline, depending on the rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant