added some comments for default values

This commit is contained in:
Oscar Krause 2023-01-19 07:25:44 +01:00
parent 7045692958
commit 91be7b226c

View File

@ -170,6 +170,14 @@ class Lease(Base):
renew = delta.total_seconds() * LEASE_RENEWAL_PERIOD renew = delta.total_seconds() * LEASE_RENEWAL_PERIOD
renew = datetime.timedelta(seconds=renew) renew = datetime.timedelta(seconds=renew)
expires = delta - renew # 19.2 expires = delta - renew # 19.2
import datetime
LEASE_RENEWAL_PERIOD=0.15 # 15%
delta = datetime.timedelta(days=90)
renew = delta.total_seconds() * LEASE_RENEWAL_PERIOD
renew = datetime.timedelta(seconds=renew)
expires = delta - renew # 76 days, 12:00:00 hours
""" """
renew = delta.total_seconds() * renewal_period renew = delta.total_seconds() * renewal_period
renew = timedelta(seconds=renew) renew = timedelta(seconds=renew)