Module: ChaoticJob
- Defined in:
- lib/chaotic_job/glitch.rb,
lib/chaotic_job.rb,
lib/chaotic_job/switch.rb,
lib/chaotic_job/tracer.rb,
lib/chaotic_job/journal.rb,
lib/chaotic_job/version.rb,
lib/chaotic_job/scenario.rb,
lib/chaotic_job/performer.rb,
lib/chaotic_job/simulation.rb
Overview
Simulation.new(job).define { |scenario| … }
Defined Under Namespace
Modules: Helpers, Journal, Performer, Switch
Classes: Glitch, Scenario, Simulation, Tracer
Constant Summary
collapse
- Error =
Class.new(StandardError)
- RetryableError =
Class.new(Error)
- Stack =
Set
- VERSION =
"0.11.2"
Class Method Summary
collapse
Class Method Details
.journal_entries(scope: nil) ⇒ Object
42
43
44
45
46
47
48
|
# File 'lib/chaotic_job.rb', line 42
def self.journal_entries(scope: nil)
if scope
Journal.entries(scope: scope)
else
Journal.entries
end
end
|
.journal_size(scope: nil) ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/chaotic_job.rb', line 50
def self.journal_size(scope: nil)
if scope
Journal.size(scope: scope)
else
Journal.size
end
end
|
.log_to_journal!(item = nil, scope: nil) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/chaotic_job.rb', line 18
def self.log_to_journal!(item = nil, scope: nil)
if item && scope
Journal.log(item, scope: scope)
elsif item
Journal.log(item)
elsif scope
Journal.log(scope: scope)
else
Journal.log
end
end
|
.push_to_journal!(item = nil, scope: nil) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/chaotic_job.rb', line 30
def self.push_to_journal!(item = nil, scope: nil)
if item && scope
Journal.push(item, scope: scope)
elsif item
Journal.push(item)
elsif scope
Journal.push(scope: scope)
else
Journal.push
end
end
|
.switch_off! ⇒ Object
78
79
80
|
# File 'lib/chaotic_job.rb', line 78
def self.switch_off!
Switch.off!
end
|
.switch_off? ⇒ Boolean
70
71
72
|
# File 'lib/chaotic_job.rb', line 70
def self.switch_off?
Switch.off?
end
|
.switch_on! ⇒ Object
74
75
76
|
# File 'lib/chaotic_job.rb', line 74
def self.switch_on!
Switch.on!
end
|
.switch_on? ⇒ Boolean
66
67
68
|
# File 'lib/chaotic_job.rb', line 66
def self.switch_on?
Switch.on?
end
|
.top_journal_entry(scope: nil) ⇒ Object
58
59
60
61
62
63
64
|
# File 'lib/chaotic_job.rb', line 58
def self.top_journal_entry(scope: nil)
if scope
Journal.top(scope: scope)
else
Journal.top
end
end
|