o
    uvXj˜  ã                   @   sD   d Z ddlZddlmZ ddlmZ ddlmZ G dd„ deƒZdS )z|
Daily cleanup job.

Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
é    N)Úsettings)Úcaches)ÚDailyJobc                   @   s   e Zd ZdZdd„ ZdS )ÚJobzCache (db) cleanup Jobc                 C   sF   t tdƒr!t tj¡D ]\}}|d  d¡rt| }| ¡  qd S d S )NÚCACHESÚBACKENDÚDatabaseCache)Úhasattrr   ÚsixÚ	iteritemsr   Úendswithr   Úclear)ÚselfÚ
cache_nameÚcache_optionsÚcache© r   úg/var/www/html/myproject/venv/lib/python3.10/site-packages/django_extensions/jobs/daily/cache_cleanup.pyÚexecute   s   
€ûzJob.executeN)Ú__name__Ú
__module__Ú__qualname__Úhelpr   r   r   r   r   r      s    r   )	Ú__doc__r
   Údjango.confr   Údjango.core.cacher   Ú!django_extensions.management.jobsr   r   r   r   r   r   Ú<module>   s   