public function serialize(Job $job)
    {
        $attributes = $job->getAttributes();
        $attributes['className'] = get_class($job);
        $attributes['type'] = $job->getType();
        return $attributes;
    }