Skip to content

[job-queue] Change type hint from Closure to callable #286

@msheakoski

Description

@msheakoski

In the JobRunner (and possibly other areas), the type hint currently limits you to working with closures. For more complex jobs, it is nicer to have an object because you can utilize DI and autoloading. Changing Closure to callable would maintain backwards compatibility and open up more options to the end user.

public function runUnique($ownerId, $name, \Closure $runCallback)

public function createDelayed($name, \Closure $startCallback)

public function runDelayed($jobId, \Closure $runCallback)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions