ЛР6: наблюдаемость, SLO и диагностика отказов

This commit is contained in:
2026-11-16 21:07:01 +03:00
parent 470d9d6f1e
commit 8a96df4a74
217 changed files with 15534 additions and 34 deletions
+16
View File
@@ -0,0 +1,16 @@
import os
import time
def inject(repository, job, point):
action = repository.fault(job, point)
if action == "crash":
os._exit(71)
if action == "pause":
time.sleep(12)
if action == "timeout":
time.sleep(repository.settings.timeout + 5)
if action == "transient":
raise TimeoutError("injected_transient")
if action == "permanent":
raise ValueError("injected_permanent")