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

feat: make lease expiration times configurable #2217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openassessment/assessment/models/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import logging
import random

from django.conf import settings
from django.db import DatabaseError, models
from django.utils.timezone import now

Expand Down Expand Up @@ -108,7 +109,7 @@ class PeerWorkflow(models.Model):

"""
# Amount of time before a lease on a submission expires
TIME_LIMIT = timedelta(hours=8)
TIME_LIMIT = timedelta(hours=getattr(settings, "PEER_LEASE_EXPIRATION_HOURS", 8))

student_id = models.CharField(max_length=40, db_index=True)
item_id = models.CharField(max_length=255, db_index=True)
Expand Down
3 changes: 2 additions & 1 deletion openassessment/assessment/models/staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from datetime import timedelta
import logging

from django.conf import settings
from django.db import DatabaseError, models
from django.utils.timezone import now

Expand All @@ -28,7 +29,7 @@ class StaffWorkflow(models.Model):

"""
# Amount of time before a lease on a submission expires
TIME_LIMIT = timedelta(hours=8)
TIME_LIMIT = timedelta(hours=getattr(settings, "STAFF_LEASE_EXPIRATION_HOURS", 8))

scorer_id = models.CharField(max_length=40, db_index=True, blank=True)
course_id = models.CharField(max_length=255, db_index=True)
Expand Down
Loading