better docstrings and comments

This commit is contained in:
Nick Sweeting 2024-11-15 23:21:34 -08:00
parent 6448968952
commit ed43f1d027
No known key found for this signature in database
4 changed files with 36 additions and 18 deletions

View file

@ -11,7 +11,11 @@ from core.models import Snapshot, ArchiveResult
class SnapshotMachine(StateMachine, strict_states=True):
"""State machine for managing Snapshot lifecycle."""
"""
State machine for managing Snapshot lifecycle.
https://github.com/ArchiveBox/ArchiveBox/wiki/ArchiveBox-Architecture-Diagrams
"""
model: Snapshot
@ -47,8 +51,13 @@ class SnapshotMachine(StateMachine, strict_states=True):
self.snapshot.retry_at = None
self.snapshot.save()
class ArchiveResultMachine(StateMachine, strict_states=True):
"""State machine for managing ArchiveResult lifecycle."""
"""
State machine for managing ArchiveResult lifecycle.
https://github.com/ArchiveBox/ArchiveBox/wiki/ArchiveBox-Architecture-Diagrams
"""
model: ArchiveResult