o
    i                     @   sV   d dl Z d dlmZ ddlmZ ddlmZ erddlmZ ddd	ed
dfddZ	dS )    N)TYPE_CHECKING   )IntermediateQueue)Queue)
BaseWorkerworkerr   queuereturnc                 C   s,   t dt t|j|jd}|| | dS )a  
    Check whether there are any jobs stuck in the intermediate queue.

    A job may be stuck in the intermediate queue if a worker has successfully dequeued a job
    but was not able to push it to the StartedJobRegistry. This may happen in rare cases
    of hardware or network failure.

    We consider a job to be stuck in the intermediate queue if it doesn't exist in the StartedJobRegistry.
    zNclean_intermediate_queue is deprecated. Use IntermediateQueue.cleanup instead.)
connectionN)warningswarnDeprecationWarningr   keyr
   cleanup)r   r   intermediate_queue r   E/home/app/Keep/.python/lib/python3.10/site-packages/rq/maintenance.pyclean_intermediate_queue   s   
r   )
r   typingr   r   r   r   r   r   r   r   r   r   r   r   <module>   s    