refactor(api): replace AutoRenewRedisLock with DbMigrationAutoRenewLock

- Updated the database migration locking mechanism to use DbMigrationAutoRenewLock for improved clarity and functionality.
- Removed the AutoRenewRedisLock implementation and its associated tests.
- Adjusted integration and unit tests to reflect the new locking class and its usage in the upgrade_db command.

(cherry picked from commit c812ad9ff26bed3eb59862bd7a5179b7ee83f11f)
This commit is contained in:
L1nSn0w
2026-02-14 12:11:52 +08:00
parent 94603b5408
commit 5ccbc00eb9
4 changed files with 27 additions and 29 deletions

View File

@ -4,7 +4,7 @@ import types
from unittest.mock import MagicMock
import commands
from libs.auto_renew_redis_lock import LockNotOwnedError, RedisError
from libs.db_migration_lock import LockNotOwnedError, RedisError
HEARTBEAT_WAIT_TIMEOUT_SECONDS = 5.0