src/closure/Behavior.php
public function beforePush(PushEvent $event)
    {
        if ($event->job instanceof \Closure) {
            $serializer = new Serializer();
            $serialized = $serializer->serialize($event->job);
            $event->job = new Job();
            $event->job->serialized = $serialized;
        }
    }
public function beforePush(PushEvent $event)
    {
        if ($event->job instanceof \Closure) {
            $serializer = new Serializer();
            $serialized = $serializer->serialize($event->job);
            $event->job = new Job();
            $event->job->serialized = $serialized;
        }
    }
Converts the closure to a job object.
@param PushEvent $event