ó
¸9—^c           @   s\   d  Z  d d l Z d d l m Z d d l m Z d d l m Z d e f d „  ƒ  YZ d S(   s|   
Daily cleanup job.

Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
iÿÿÿÿN(   t   settings(   t   caches(   t   DailyJobt   Jobc           B   s   e  Z d  Z d „  Z RS(   s   Cache (db) cleanup Jobc         C   sd   t  t d ƒ r` xJ t j t j ƒ D]6 \ } } | d j d ƒ r" t | } | j ƒ  q" q" Wd  Sd  S(   Nt   CACHESt   BACKENDt   DatabaseCache(   t   hasattrR    t   sixt	   iteritemsR   t   endswithR   t   clear(   t   selft
   cache_namet   cache_optionst   cache(    (    sL   /tmp/pip-unpacked-wheel-a0M10Y/django_extensions/jobs/daily/cache_cleanup.pyt   execute   s    
(   t   __name__t
   __module__t   helpR   (    (    (    sL   /tmp/pip-unpacked-wheel-a0M10Y/django_extensions/jobs/daily/cache_cleanup.pyR      s   (	   t   __doc__R   t   django.confR    t   django.core.cacheR   t!   django_extensions.management.jobsR   R   (    (    (    sL   /tmp/pip-unpacked-wheel-a0M10Y/django_extensions/jobs/daily/cache_cleanup.pyt   <module>   s
   