mirror of
				https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
				synced 2025-11-04 02:26:10 +00:00 
			
		
		
		
	added startup script
This commit is contained in:
		@@ -536,7 +536,14 @@ async def leasing_v1_lessor_shutdown(request: Request):
 | 
			
		||||
 | 
			
		||||
@app.on_event('startup')
 | 
			
		||||
async def app_on_startup():
 | 
			
		||||
    logger.info(f'Using timezone: {str(TZ)}. Make sure this is correct and match your clients!')
 | 
			
		||||
    logger.info(f'''
 | 
			
		||||
    Using timezone: {str(TZ)}. Make sure this is correct and match your clients!
 | 
			
		||||
    
 | 
			
		||||
    Your clients renew their license every {str(Lease.calculate_renewal(LEASE_RENEWAL_PERIOD, LEASE_RENEWAL_DELTA))}.
 | 
			
		||||
    If the renewal fails, the license is {str(LEASE_RENEWAL_DELTA)} valid.
 | 
			
		||||
    
 | 
			
		||||
    Your client-token file (.tok) is valid for {str(CLIENT_TOKEN_EXPIRE_DELTA)}.
 | 
			
		||||
    ''')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user