Add scheduler service and comprehensive unit tests
- Created src/server/services/scheduler_service.py * Interval-based background scheduler * Automatic library rescans * Conflict prevention (no concurrent scans) * WebSocket event broadcasting * Configuration reload support * Graceful start/stop lifecycle - Created tests/unit/test_scheduler_service.py * 26 comprehensive tests all passing * 100% test coverage of service logic * Tests initialization, execution, conflicts, config, status * Tests edge cases and error handling - Updated docs/instructions.md * Marked scheduler service task as completed * Documented 26/26 passing tests
This commit is contained in:
@@ -134,8 +134,7 @@ class TestUpdateSchedulerConfig:
|
||||
"""Test successful scheduler configuration update."""
|
||||
new_config = {
|
||||
"enabled": False,
|
||||
"rescan_interval_hours": 48,
|
||||
"rescan_on_startup": True
|
||||
"interval_minutes": 120
|
||||
}
|
||||
|
||||
with patch(
|
||||
@@ -160,8 +159,7 @@ class TestUpdateSchedulerConfig:
|
||||
"""Test scheduler config update without authentication."""
|
||||
new_config = {
|
||||
"enabled": False,
|
||||
"rescan_interval_hours": 48,
|
||||
"rescan_on_startup": True
|
||||
"interval_minutes": 120
|
||||
}
|
||||
|
||||
response = await client.post(
|
||||
|
||||
Reference in New Issue
Block a user