Skip to content

Commit 8901ef1

Browse files
committed
feat(system): добавить эндпоинт для полного состояния системы и соответствующие структуры данных
1 parent 15f911d commit 8901ef1

21 files changed

Lines changed: 2000 additions & 180 deletions

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help build test lint run-api run-worker docker-build docker-build-executor docker-up docker-down migrate-up migrate-down clean admin create-user benchmark benchmark-interpret test-load test-contract generate-contract-mocks deploy deploy-weak deploy-medium deploy-strong detect-profile backup restore backup-list generate tools
1+
.PHONY: status help build test lint run-api run-worker docker-build docker-build-executor docker-up docker-down migrate-up migrate-down clean admin create-user benchmark benchmark-interpret test-load test-contract generate-contract-mocks deploy deploy-weak deploy-medium deploy-strong detect-profile backup restore backup-list generate tools
22

33
# Default target
44
help:
@@ -120,6 +120,10 @@ docker-build-executor:
120120
@echo "Building tjudge-cli executor image..."
121121
docker build -t tjudge-cli:latest -f docker/tjudge/Dockerfile .
122122

123+
# Show full system status (containers, images, health, /system/status)
124+
status:
125+
@./scripts/status.sh
126+
123127
# Build only tjudge-builder compile sandbox image
124128
docker-build-builder:
125129
@echo "Building tjudge-builder compile sandbox image..."

cmd/api/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,15 @@ func main() {
292292
log,
293293
).WithAdminChecker(adminChecker).
294294
WithIdempotency(redisCache).
295-
WithAuditLog(auditLogger, auditHandler)
295+
WithAuditLog(auditLogger, auditHandler).
296+
WithSystemStatus(handlers.NewSystemStatusHandler(
297+
db.NewSystemStatusRepository(database),
298+
queueManager,
299+
compileQueue,
300+
wsHub,
301+
redisCache,
302+
log,
303+
))
296304

297305
// Создаём HTTP сервер
298306
srv := &http.Server{

0 commit comments

Comments
 (0)