15 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
| from django.apps import AppConfig
 | |
| from django.core.cache import cache
 | |
| 
 | |
| class AmConfig(AppConfig):
 | |
|     default_auto_field = 'django.db.models.BigAutoField'
 | |
|     name = 'apps.am'
 | |
|     is_initialized = False
 | |
| 
 | |
|     def ready(self) -> None:
 | |
|         if not self.is_initialized:
 | |
|             from apps.am.tasks import cache_areas_info
 | |
|             cache_areas_info.delay()
 | |
|             self.is_initialized = True
 | |
|         return super().ready()
 |