doorcontrol: Update UniFi Access user data every 5 minutes
All checks were successful
Ruff / ruff (push) Successful in 31s
Test / test (push) Successful in 6m23s

This commit is contained in:
Adam Goldsmith 2025-01-04 10:27:14 -05:00
parent c8b3edcacf
commit 349e48a018

View File

@ -9,7 +9,7 @@ def post_migrate_callback(sender, **kwargs):
from .tasks.scrapehidevents import q_getMessagesAllDoors
from .tasks.update_doors import q_update_all_doors
from .tasks.update_unifi_access import update_access
from .tasks.update_unifi_access import update_access, update_access_users
ensure_scheduled(
q_getMessagesAllDoors,
@ -29,6 +29,12 @@ def post_migrate_callback(sender, **kwargs):
minutes=5,
)
ensure_scheduled(
update_access_users,
schedule_type=Schedule.MINUTES,
minutes=5,
)
class DoorControlConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"