This commit is contained in:
2026-01-04 01:20:00 +03:00
parent ad8eb5b5ee
commit 05dd721f60
10 changed files with 23 additions and 19 deletions
@@ -1,7 +1,7 @@
from dishka import AsyncContainer
from trudex.infrastructure.database.dao.test import TestDAO
from trudex.infrastructure.utils.timezone import now_msk
from trudex.infrastructure.utils.timezone import now_msk_naive
async def deactivate_expired_tests(container: AsyncContainer):
@@ -11,5 +11,5 @@ async def deactivate_expired_tests(container: AsyncContainer):
tests = await test_dao.get_all()
for test in tests:
if test.expires_at and test.expires_at < now_msk() and test.is_active:
if test.expires_at and test.expires_at < now_msk_naive() and test.is_active:
await test_dao.update(test.id, is_active=False)