This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/authentik/outposts/apps.py
Jens Langhammer b8a566f4a0 outposts: move local connection check to task, run every 60 minutes
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-21 11:34:48 +02:00

26 lines
654 B
Python

"""authentik outposts app config"""
from importlib import import_module
from django.apps import AppConfig
from django.db import ProgrammingError
from structlog.stdlib import get_logger
LOGGER = get_logger()
class AuthentikOutpostConfig(AppConfig):
"""authentik outposts app config"""
name = "authentik.outposts"
label = "authentik_outposts"
verbose_name = "authentik Outpost"
def ready(self):
import_module("authentik.outposts.signals")
try:
from authentik.outposts.tasks import outpost_local_connection
outpost_local_connection.delay()
except ProgrammingError:
pass