Skip to content

Bug: worker thrashing on task startup #470

@kmc-firework

Description

@kmc-firework

Hi there,

While trying to use TaskIQ in a specific scenario, waiting for a task to spin up resulted in constant thrashing (task killed and restarted in loop). After triaging the case, @reggie-firework and I noticed this specific line:

https://github.com/taskiq-python/taskiq/blob/master/taskiq/cli/worker/process_manager.py#L100

To us, the logic appears backwards, why wait when the task is alive? I can assume there may be additional warmup, but after inverting the logic, it resolved our issue with thrashing. @reggie-firework is more than happy to submit a PR but we wanted to bring up a discussion about it first to ensure there's no conflict and we're understanding the issue correctly.

Thank you for your time!

-ken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions