o
    h                     @   s  d Z ddlZddlZddlZddlZzddlmZ W n ey)   ddlmZ Y nw ddl	Z	ddl
Z	ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZmZmZ dd
lmZ ddlmZ ddlmZmZm Z  ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 e	j7dddZ8e	j7dddZ9e	7dZ:ej;dkreddZ<nz	e =dg Z<W n e>y   e j?ddZ<Y nw ee<e	j@ed d!e	jAd"d#d$ee	jBd%d&e	jAd'd(d)ed%d*e	jAd+d,ed%d*e	jAd-d.ed%d*e	jAd/d0ed%d*e	jAd1eejCd2d3 d d%d4e	jAd5d6d7d ed%d8e	jAd9d:d ed%d;e	jAd<ed d%d=e	jAd>d?ed d%d@dAe	jDdBdC ZejEedDe	jDdEdF ZFeGe. eGe eGe eGe& eGe0 eGe* eGe  eGe6 eGe" eGe eGe eGe$ eGe4 eGe( eGe eGe2 eGe, e	jHjIjJZKdGZLdMdHdIZMeMe	jHjI_JdJeNfdKdLZOdS )NzCelery Command Line Interface.    N)entry_points)DYMGroup)with_plugins)VERSION_BANNER)find_app)amqp)CeleryCommandCeleryOption
CLIContext)beat)call)controlinspectstatus)events)graph)list_)logtool)migrate)multi)purge)result)shell)upgrade)workerzA
Unable to load celery application.
The module {0} was not found.redfgzi
Unable to load celery application.
While trying to load the module {0} the following error occurred:
{1}z'
Unable to load celery application.
{0})   
   zcelery.commands)groupT)clsinvoke_without_command-A--appAPPzGlobal Options)envvarr!   type
help_groupz-bz--broker
BROKER_URL)r&   r!   r(   z--result-backendRESULT_BACKENDz--loaderLOADERz--configCONFIG_MODULEz	--workdirc                 C   s   |rt |S d S N)oschdir)___wd r3   S/var/www/html/optinet_system/venv/lib/python3.10/site-packages/celery/bin/celery.py<lambda>[   s    r5   )r!   r'   callbackis_eagerr(   z-Cz
--no-colorNO_COLOR)r&   is_flagr!   r(   z-qz--quiet)r9   r!   r(   z	--version)r!   r9   r(   z--skip-checksSKIP_CHECKSzSkip Django core checks on startup. Setting the SKIP_CHECKS environment variable to any non-empty string will have the same effect.)r&   r!   r9   r(   helpc              
   C   s  |	rt t |   n| jdu rt |   |   |r#|tjd< |r*|tjd< |r1|tjd< |r8|tjd< |
r?dtjd< t|t	rzt
|}W nb tyw } z!|j|krdt }| t|| | t|j W Y d}~n:d}~w ty } z|jd  }| t| W Y d}~nd}~w ty   t }| t|| Y nw t||||d	| _tj| jjjd
g  t j| jjjdg  t!j| jjjdg  t"j#$ D ]}|j| jjjdg  qdS )zCelery command entrypoint.NCELERY_LOADERCELERY_BROKER_URLCELERY_RESULT_BACKENDCELERY_CONFIG_MODULEtrueCELERY_SKIP_CHECKSr   )appno_colorworkdirquietr   r   r   preload)%clickechor   exitinvoked_subcommandget_helpr.   environ
isinstancestrr   ModuleNotFoundErrorname	traceback
format_excfail!UNABLE_TO_LOAD_APP_ERROR_OCCURREDformat#UNABLE_TO_LOAD_APP_MODULE_NOT_FOUNDAttributeErrorargs
capitalizeUNABLE_TO_LOAD_APP_APP_MISSING	Exceptionr
   objr   paramsextendrB   user_optionsgetr   r   celerycommandsvalues)ctxrB   brokerresult_backendloaderconfigrD   rC   rE   versionskip_checkseexcattribute_namecommandr3   r3   r4   ra   ;   s\   =











ra   )r!   c                 K   s&   | j j}|j  | j |  dS )z3Shows information useful to include in bug-reports.N)r\   rB   rg   import_default_modulesrH   	bugreport)rd   kwargsrB   r3   r3   r4   report   s   
rr   a  You are using `{option_name}` as an option of the {info_name} sub-command:
celery {info_name} {option_name} celeryapp <...>

The support for this usage was removed in Celery 5.0. Instead you should use `{option_name}` as a global option:
celery {option_name} celeryapp {info_name} <...>c                 C   s<   | j dv r| jjjtj| j | jjddd t| |d d S )N)r#   r$   )option_name	info_namer   r   )file)rs   rd   r\   errorWRONG_APP_OPTION_USAGE_MESSAGErU   rt   previous_show_implementation)selfru   r3   r3   r4   _show   s   
rz   returnc                   C   s
   t ddS )zStart celery umbrella command.

    This function is the main entrypoint for the CLI.

    :return: The exit code of the CLI.
    CELERY)auto_envvar_prefix)ra   r3   r3   r3   r4   main   s   
r~   r-   )P__doc__r.   pathlibsysrQ   importlib.metadatar   ImportErrorimportlib_metadatarG   click.exceptionsclick_didyoumeanr   click_pluginsr   ra   r   celery.app.utilsr   celery.bin.amqpr   celery.bin.baser   r	   r
   celery.bin.beatr   celery.bin.callr   celery.bin.controlr   r   r   celery.bin.eventsr   celery.bin.graphr   celery.bin.listr   celery.bin.logtoolr   celery.bin.migrater   celery.bin.multir   celery.bin.purger   celery.bin.resultr   celery.bin.shellr   celery.bin.upgrader   celery.bin.workerr   stylerV   rT   rZ   version_info_PLUGINSr`   rW   selectr    optionUNPROCESSEDPathpass_contextrn   rr   add_command
exceptionsNoSuchOptionshowrx   rw   rz   intr~   r3   r3   r3   r4   <module>   s   


"
5



















