lct-39: пауза занятия с пульта, таймеры и очередь ДДС стоят на время простоя
This commit is contained in:
parent
b4420cea16
commit
b77d65c82e
23 changed files with 410 additions and 20 deletions
|
|
@ -32,7 +32,9 @@ from app.session.store import (
|
|||
HintRecorded,
|
||||
LessonEnded,
|
||||
LessonIdentity,
|
||||
LessonPaused,
|
||||
LessonRequest,
|
||||
LessonResumed,
|
||||
LessonStarted,
|
||||
NoteAdded,
|
||||
Record,
|
||||
|
|
@ -196,6 +198,16 @@ class PostgresSessionStore:
|
|||
object_id=str(session_id),
|
||||
detail=f"missed_count={len(record.missed)}; comment_chars={len(record.comment)}",
|
||||
))
|
||||
case LessonPaused(at=at, author=author, role=role):
|
||||
db.add(AuditLog(
|
||||
actor=author, role=role, action="session.pause",
|
||||
object_id=str(session_id), detail=f"at={at.isoformat()}",
|
||||
))
|
||||
case LessonResumed(at=at, author=author, role=role, paused_ms=paused_ms):
|
||||
db.add(AuditLog(
|
||||
actor=author, role=role, action="session.resume",
|
||||
object_id=str(session_id), detail=f"at={at.isoformat()}; paused_ms={paused_ms}",
|
||||
))
|
||||
case LessonStarted(at=at):
|
||||
await db.execute(
|
||||
update(Session).where(Session.id == session_id).values(started_at=at)
|
||||
|
|
|
|||
Loading…
Reference in a new issue