- Deleted: TNAR, demo-event-log, demo-managed-functions, hello-go, hello-node, k8s, notes-python, pg-list-python, simple-node, simple-python - POSTGRES: removed luceUNDnode.tf (commented-out legacy), stress_log_1.txt, funcs_list.py; disabled stress_destroy_apply.sh (PG lifecycle stress has delete_user bug); added README.md - examples/README.md: updated to reflect current state (sless_service + sless_job)
14 lines
624 B
Python
14 lines
624 B
Python
# 2026-03-19
|
|
# stress_divzero.py — намеренно делит на ноль (ZeroDivisionError).
|
|
# Проверяет: платформа перехватывает панику, возвращает HTTP 500, не роняет под.
|
|
|
|
_VERSION = "v1"
|
|
|
|
|
|
def run(event):
|
|
numerator = int(event.get("n", 42))
|
|
denominator = int(event.get("d", 0)) # по умолчанию 0 — намеренный краш
|
|
# ZeroDivisionError: проверяем что платформа обрабатывает исключения
|
|
result = numerator / denominator
|
|
return {"version": _VERSION, "result": result}
|