Class: CI::Queue::Redis::TestTimeRecord

Inherits:
Worker
  • Object
show all
Defined in:
lib/ci/queue/redis/test_time_record.rb

Constant Summary

Constants inherited from Base

Base::CONNECTION_ERRORS, Base::TEN_MINUTES

Constants included from Common

Common::CONNECTION_ERRORS

Instance Attribute Summary

Attributes inherited from Worker

#total

Attributes included from Common

#config

Instance Method Summary collapse

Methods inherited from Worker

#acknowledge, #build, #distributed?, #initialize, #master?, #poll, #populate, #populated?, #release!, #report_worker_error, #requeue, #retry_queue, #retrying?, #shutdown!, #shutdown_required?, #supervisor

Methods inherited from Base

#boot_heartbeat_process!, #created_at=, #custom_config, #custom_middlewares, #ensure_heartbeat_thread_alive!, #exhausted?, #expired?, #increment_test_failed, #initialize, #max_test_failed?, #progress, #queue_initialized?, #queue_initializing?, #reconnect_attempts, #remaining, #running, #size, #stop_heartbeat!, #test_failed, #to_a, #wait_for_master, #with_heartbeat, #workers_count

Methods included from Common

#distributed?, #flaky?, #release!, #report_failure!, #report_success!, #rescue_connection_errors, #retrying?

Constructor Details

This class inherits a constructor from CI::Queue::Redis::Worker

Instance Method Details

#fetchObject



11
12
13
14
15
# File 'lib/ci/queue/redis/test_time_record.rb', line 11

def fetch
  fetch_all_test_names.each_with_object({}) do |test_name, test_time_hash|
    test_time_hash[test_name] = fetch_test_time(test_name)
  end
end

#record(test_name, duration) ⇒ Object



6
7
8
9
# File 'lib/ci/queue/redis/test_time_record.rb', line 6

def record(test_name, duration)
  record_test_time(test_name, duration)
  record_test_name(test_name)
end