def to_h
      h = RRRSpec.redis.hgetall(key)
      h['key'] = key
      h['log'] = log
      h['tasks'] = tasks.map { |task| { 'key' => task.key } }
      h['slaves'] = slaves.map { |slave| { 'key' => slave.key } }
      h['worker_logs'] = worker_logs.map { |worker_log| { 'key' => worker_log.key } }
      RRRSpec.convert_if_present(h, 'max_workers') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'max_trials') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'unknown_spec_timeout_sec') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'least_timeout_sec') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'created_at') { |v| Time.zone.parse(v) }
      RRRSpec.convert_if_present(h, 'finished_at') { |v| Time.zone.parse(v) }
      h.delete('succeeded_count')
      h.delete('failed_count')
      h
    end
def to_h
      h = RRRSpec.redis.hgetall(key)
      h['key'] = key
      h['log'] = log
      h['tasks'] = tasks.map { |task| { 'key' => task.key } }
      h['slaves'] = slaves.map { |slave| { 'key' => slave.key } }
      h['worker_logs'] = worker_logs.map { |worker_log| { 'key' => worker_log.key } }
      RRRSpec.convert_if_present(h, 'max_workers') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'max_trials') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'unknown_spec_timeout_sec') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'least_timeout_sec') { |v| v.to_i }
      RRRSpec.convert_if_present(h, 'created_at') { |v| Time.zone.parse(v) }
      RRRSpec.convert_if_present(h, 'finished_at') { |v| Time.zone.parse(v) }
      h.delete('succeeded_count')
      h.delete('failed_count')
      h
    end
==========================================================================
 Serialize