protected function mapJob($job)
    {
        try {
            $payload = json_decode($job->payload);
            $job->job = isset($payload->displayName) ? $payload->displayName : (isset($payload->job) ? $payload->job : 'Unknown');
            $job->attempts = isset($payload->attempts) ? $payload->attempts : null;
            $job->maxTries = isset($payload->maxTries) ? $payload->maxTries : null;
            $job->timeout = isset($payload->timeout) ? $payload->timeout : null;
            $job->job_id = isset($payload->id) ? $payload->id : null;

            if (config('eyewitness.allow_failed_job_exception_data', true)) {
                $job->exception = isset($job->exception) ? $job->exception : null;
            } else {
                $job->exception = null;
            }

            if (config('eyewitness.allow_failed_job_payload_data', true)) {
                try {
                    $job->payload = isset($payload->data->command) ? $payload->data->command : (isset($payload->data) ? $payload->data : $job->payload);
                    $job->payload = get_object_vars(unserialize($job->payload));
                } catch (Exception $e) {
                    $this->eye->logger()->debug('Unable to decode payload', ['exception' => $e->getMessage()]);
                }
            } else {
                $job->payload = null;
            }

            return $job;
        } catch (Exception $e) {
            $this->eye->logger()->error('Unable to map the Failed Job', $e);
        }

        return null;
    }