o
    ›¨Êh 
  ã                   @   sä   d Z ddlmZ ddlZddlmZmZmZmZ ddl	m
Z
mZ ejeddid�ejd	edd
ddd�ejddedd„ ddd�ejddedd„ ddd�ejdeeddd�ejdddeeddd�eje		d"d d!„ƒƒƒƒƒƒƒƒZdS )#z#The :program:`celery beat` command.é    )ÚpartialN)Ú	LOG_LEVELÚCeleryDaemonCommandÚCeleryOptionÚhandle_preload_options)ÚdetachedÚmaybe_drop_privilegesÚallow_extra_argsT)ÚclsÚcontext_settingsz--detachFzBeat Optionsz-Detach and run in the background as a daemon.)r
   Úis_flagÚdefaultÚ
help_groupÚhelpz-sz
--schedulec                 C   ó   |p| j jjjS ©N)ÚobjÚappÚconfÚbeat_schedule_filename©ÚctxÚ_Úvalue© r   úA/var/www/html/env/lib/python3.10/site-packages/celery/bin/beat.pyÚ<lambda>   ó    r   zvPath to the schedule database.  Defaults to `celerybeat-schedule`.The extension '.db' may be appended to the filename.)r
   Úcallbackr   r   z-Sz--schedulerc                 C   r   r   )r   r   r   Úbeat_schedulerr   r   r   r   r      r   zScheduler class to use.z--max-intervalz1Max seconds to sleep between schedule iterations.)r
   Útyper   r   z-lz
--loglevelÚWARNINGzLogging level.)r   r
   r    r   r   c              
   K   sÌ   | j j}	| jr(z|	 | j¡ W n ttfy' }
 z
tjd|
› �| d�‚d}
~
ww |s0t||d� t	|	j
f||| j jdœ|¤Ž}|rat||||||ƒ� |ƒ  ¡ W  d  ƒ S 1 sZw   Y  dS |ƒ  ¡ S )z'Start the beat periodic task scheduler.z?Unable to parse extra configuration from command line.
Reason: )r   N)ÚuidÚgid)ÚlogfileÚpidfileÚquiet)r   r   ÚargsÚconfig_from_cmdlineÚKeyErrorÚ
ValueErrorÚclickÚ
UsageErrorr   r   ÚBeatr&   r   Úrun)r   Údetachr$   r%   r"   r#   ÚumaskÚworkdirÚkwargsr   ÚeÚbeatr   r   r   r4   
   s2   (þþ€þþþ$ÿ
r4   )FNNNNNN)Ú__doc__Ú	functoolsr   r+   Úcelery.bin.baser   r   r   r   Úcelery.platformsr   r   ÚcommandÚoptionÚintÚpass_contextr4   r   r   r   r   Ú<module>   s`    ÿûûûüúÿ