o
    ,_Vg                     @   s8   d dl mZ d dlmZ d dlmZ G dd deZdS )    )print_function)BaseCommand)Crontabc                   @   s    e Zd ZdZdd Zdd ZdS )Commandz\run this command to add, show or remove the jobs defined in CRONJOBS setting from/to crontabc                 C   s$   |j dg dd |j ddd d S )N
subcommand)addshowremoverun)choicesjobhash?)nargs)add_argument)selfparser r   |/var/www/html/myvaluetrips/my_value_trip_new/venv/lib/python3.10/site-packages/django_crontab/management/commands/crontab.pyadd_arguments
   s   zCommand.add_argumentsc                 O   s  |d dkr(t d
i |}|  |  W d   dS 1 s!w   Y  dS |d dkrNt d
ddi|}|  W d   dS 1 sGw   Y  dS |d dkrrt d
i |}|  W d   dS 1 skw   Y  dS |d dkrt  |d	  dS t| j dS )z0
        Dispatches by given subcommand
        r   r   Nr   readonlyTr	   r
   r   r   )r   remove_jobsadd_jobs	show_jobsrun_jobprinthelp)r   argsoptionscrontabr   r   r   handle   s    
"
"
"zCommand.handleN)__name__
__module____qualname__r   r   r   r   r   r   r   r      s    r   N)
__future__r   django.core.management.baser   django_crontab.crontabr   r   r   r   r   r   <module>   s    