Class: CI::Queue::File

Inherits:
Static
  • Object
show all
Defined in:
lib/ci/queue/file.rb

Constant Summary

Constants inherited from Static

Static::TEN_MINUTES

Constants included from Common

Common::CONNECTION_ERRORS

Instance Attribute Summary

Attributes inherited from Static

#progress, #total

Attributes included from Common

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Static

#acknowledge, #boot_heartbeat_process!, #build, #created_at=, #distributed?, #ensure_heartbeat_thread_alive!, #exhausted?, #expired?, #increment_test_failed, #max_test_failed?, #poll, #populate, #populated?, #remaining, #report_worker_error, #requeue, #retry_queue, #running, #shutdown!, #size, #stop_heartbeat!, #supervisor, #test_failed, #to_a, #with_heartbeat

Methods included from Common

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

Constructor Details

#initialize(path, *args) ⇒ File

Returns a new instance of File.



13
14
15
16
# File 'lib/ci/queue/file.rb', line 13

def initialize(path, *args)
  io = path == '-' ? STDIN : ::File.open(path)
  super(io.each_line.map(&:strip).reject(&:empty?), *args)
end

Class Method Details

.from_uri(uri, config) ⇒ Object



8
9
10
# File 'lib/ci/queue/file.rb', line 8

def from_uri(uri, config)
  new(uri.path, config)
end