
    `f<                     @   d Z ddlZddlmZ ddlmZmZmZ ddlm	Z	  ej
        e           ej        d           ej        d           ej        d	d
eedd           ej        ddeedd           ej        ddeddd           ej        ddedd           ej        ddedd           ej        ddeddd          ej        ed                                                                                                                                      ZdS )!zAThe ``celery migrate`` command, used to filter and move messages.    N)
Connection)CeleryCommandCeleryOptionhandle_preload_options)migrate_tasks)clssourcedestinationz-nz--limitzMigration OptionszNumber of tasks to consume.)r   type
help_grouphelpz-tz	--timeoutz%Timeout in seconds waiting for tasks.z-az--ack-messagesTz Ack messages from source broker.)r   is_flagr   r   z-Tz--tasksz List of task names to filter on.)r   r   r   z-Qz--queueszList of queues to migrate.z-Fz	--foreverz'Continually migrate tasks until killed.c                 f      fd}t          t          |          t          |          fd|i| dS )zMigrate tasks from one broker to another.

    Warning:

        This command is experimental, make sure you have a backup of
        the tasks before you continue.
    c                 b    j                             d| j         d| j         d|            d S )NzMigrating task /z: )objechocountstrtotal)statebodymessagectxs      D/var/www/html/env/lib/python3.11/site-packages/celery/bin/migrate.pyon_migrate_taskz migrate.<locals>.on_migrate_task9   s:    Mu{MMU^MMtMMNNNNN    callbackN)r   r   )r   r	   r
   kwargsr   s   `    r   migrater   	   sl    `O O O O O *V$$[)) *     r   )__doc__clickkombur   celery.bin.baser   r   r   celery.contrib.migrater   commandargumentoptionintfloatpass_contextr    r   r   <module>r,      s   G G        O O O O O O O O O O 0 0 0 0 0 0 =!!!d,02 2 2 d,:< < < d,57 7 7 d,5	7 7 7
 d,/	1 1 1
 d,<> > >    > >1 17 77 7< <2 2   "!N  r   