mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-21 22:08:48 +00:00
added some comments for default values
This commit is contained in:
parent
7045692958
commit
91be7b226c
@ -170,6 +170,14 @@ class Lease(Base):
|
||||
renew = delta.total_seconds() * LEASE_RENEWAL_PERIOD
|
||||
renew = datetime.timedelta(seconds=renew)
|
||||
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 = timedelta(seconds=renew)
|
||||
|
Loading…
Reference in New Issue
Block a user