Common needs timedelta
This commit is contained in:
		
							parent
							
								
									b31d93b7be
								
							
						
					
					
						commit
						6f1714d100
					
				| @ -16,7 +16,7 @@ | |||||||
| # along with this program.  If not, see <https://www.gnu.org/licenses/>. | # along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||||
| 
 | 
 | ||||||
| import os | import os | ||||||
| from datetime import datetime, timezone | from datetime import datetime, timedelta, timezone | ||||||
| 
 | 
 | ||||||
| def clean_old_logs(log_dir, max_age_seconds=86400): | def clean_old_logs(log_dir, max_age_seconds=86400): | ||||||
|     now = datetime.now(timezone.utc) |     now = datetime.now(timezone.utc) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user