Files
hostpanel/ssh_manager/signals.py
ilkeral 342f1314c7 yeni
2025-07-21 13:49:36 +03:00

13 lines
474 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db.models.signals import post_migrate
from django.dispatch import receiver
from django.apps import apps
from .ssh_client import SSHManager # utils yerine ssh_client'dan import et
@receiver(post_migrate)
def check_connection_on_startup(sender, **kwargs):
"""
Uygulama başlatıldığında sunucu bağlantısını kontrol et
"""
if sender.name == 'ssh_manager':
from .apps import check_server_connection
check_server_connection()