13 lines
474 B
Python
13 lines
474 B
Python
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() |