from typing import Any, Optional

class StopFiltering(Exception): ...

class State:
    count: int = ...
    filtered: int = ...
    total_apx: int = ...
    @property
    def strtotal(self): ...

def republish(producer: Any, message: Any, exchange: Optional[Any] = ..., routing_key: Optional[Any] = ..., remove_props: Optional[Any] = ...) -> None: ...
def migrate_task(producer: Any, body_: Any, message: Any, queues: Optional[Any] = ...) -> None: ...
def migrate_tasks(source: Any, dest: Any, migrate: Any = ..., app: Optional[Any] = ..., queues: Optional[Any] = ..., **kwargs: Any): ...
def move(predicate: Any, connection: Optional[Any] = ..., exchange: Optional[Any] = ..., routing_key: Optional[Any] = ..., source: Optional[Any] = ..., app: Optional[Any] = ..., callback: Optional[Any] = ..., limit: Optional[Any] = ..., transform: Optional[Any] = ..., **kwargs: Any): ...
def task_id_eq(task_id: Any, body: Any, message: Any): ...
def task_id_in(ids: Any, body: Any, message: Any): ...

class Filterer:
    app: Any = ...
    conn: Any = ...
    filter: Any = ...
    limit: Any = ...
    timeout: Any = ...
    ack_messages: Any = ...
    tasks: Any = ...
    queues: Any = ...
    callback: Any = ...
    forever: Any = ...
    on_declare_queue: Any = ...
    consume_from: Any = ...
    state: Any = ...
    accept: Any = ...
    def __init__(self, app: Any, conn: Any, filter: Any, limit: Optional[Any] = ..., timeout: float = ..., ack_messages: bool = ..., tasks: Optional[Any] = ..., queues: Optional[Any] = ..., callback: Optional[Any] = ..., forever: bool = ..., on_declare_queue: Optional[Any] = ..., consume_from: Optional[Any] = ..., state: Optional[Any] = ..., accept: Optional[Any] = ..., **kwargs: Any) -> None: ...
    def start(self): ...
    def update_state(self, body: Any, message: Any) -> None: ...
    def ack_message(self, body: Any, message: Any) -> None: ...
    def create_consumer(self): ...
    def prepare_consumer(self, consumer: Any): ...
    def declare_queues(self, consumer: Any) -> None: ...

def start_filter(app: Any, conn: Any, filter: Any, limit: Optional[Any] = ..., timeout: float = ..., ack_messages: bool = ..., tasks: Optional[Any] = ..., queues: Optional[Any] = ..., callback: Optional[Any] = ..., forever: bool = ..., on_declare_queue: Optional[Any] = ..., consume_from: Optional[Any] = ..., state: Optional[Any] = ..., accept: Optional[Any] = ..., **kwargs: Any): ...
def move_task_by_id(task_id: Any, dest: Any, **kwargs: Any): ...
def move_by_idmap(map: Any, **kwargs: Any): ...
def move_by_taskmap(map: Any, **kwargs: Any): ...

move_direct: Any
move_direct_by_id: Any
