Operational Remediation Reports
Fiber Resume Remediation Report
Advance through fixed escalation stages by a selected pending count and turn the reached stage into a release, wait, or escalate remediation action.
Fiber Resume Remediation Report
fiber_resume_remediation_report.rb
pending =
stages = ["clear", "watch", "alarm"]
index = pending < stages.length ? pending : stages.length - 1
stage = stages.fetch(index)
action = if pending == 0
"release"
elsif pending < 3
"wait"
else
"escalate"
end
puts "pending=#{pending}"
puts "stage=#{stage}"
puts "action=#{action}"
pending =
stages = ["clear", "watch", "alarm"]
index = pending < stages.length ? pending : stages.length - 1
stage = stages.fetch(index)
action = if pending == 0
"release"
elsif pending < 3
"wait"
else
"escalate"
end
puts "pending=#{pending}"
puts "stage=#{stage}"
puts "action=#{action}"
pending =
stages = ["clear", "watch", "alarm"]
index = pending < stages.length ? pending : stages.length - 1
stage = stages.fetch(index)
action = if pending == 0
"release"
elsif pending < 3
"wait"
else
"escalate"
end
puts "pending=#{pending}"
puts "stage=#{stage}"
puts "action=#{action}"
staged escalation
A fixed list of stage labels is indexed by a scalar pending count, so the reached stage and remediation action stay deterministic without resuming a live fiber.