Skip to content

Inconsistency with start order #633

@sakshamgoyal-01

Description

@sakshamgoyal-01

Taskiq version

0.12.4

Python version

Python 3.14

OS

Debian 12

What happened?

The workers seem to not pick up tasks depending on the order the broker/workers were started.

if the worker was started before the broker, then the worker will refuse to pick up any tasks till it is restarted (and the broker is already running).

Broker initialization code

from taskiq import TaskiqState
from taskiq.events import TaskiqEvents
from taskiq_dashboard import DashboardMiddleware, TaskiqDashboard
from taskiq_postgresql import PostgresqlBroker, PostgresqlResultBackend


result_backend: PostgresqlResultBackend[ParseResult] = PostgresqlResultBackend(
    dsn=POSTGRES_DSN,
    run_migrations=True,
)

broker = PostgresqlBroker(
    dsn=POSTGRES_DSN,
    run_migrations=True,
).with_result_backend(result_backend).with_middlewares(
    DashboardMiddleware(url=DASHBOARD_URL, api_token=DASHBOARD_API_TOKEN),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions