code: def job_to_hash(job)
        ret_value = {}
        job_stats = job.stats
        job_stats.keys.each { |key| ret_value[key] = job_stats[key] }
        ret_value['body'] = job.body.inspect
        ret_value
      end
docs: Convert Beaneater::Job to hash