Skip to content

Gearman: setXXXCallback() needs to be called before addTaskXXX() #1369

Closed
@cracksalad

Description

@cracksalad

From manual page: https://php.net/gearmanclient.setcompletecallback


It should be noted that:

All the GearmanClient::setXXXCallback(...) methods (like GearmanClient::setCompleteCallback(...)) need to be called before calling some GearmanClient::addTaskXXX(...) method (like GearmanClient::addTask(...)). Setting the callback before calling GearmanClient::runTasks() is not sufficient.

Sounds stupid but such things just cost time.

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