perf: 修改 signal handler

pull/7731/head
ibuler 2022-03-03 09:58:09 +08:00 committed by 老广
parent dafc416783
commit 390b8693df
5 changed files with 4 additions and 4 deletions

View File

@ -11,4 +11,4 @@ class AuditsConfig(AppConfig):
def ready(self):
from . import signal_handlers
if settings.SYSLOG_ENABLE:
post_save.connect(signals_handler.on_audits_log_create)
post_save.connect(signal_handlers.on_audits_log_create)

View File

@ -8,7 +8,7 @@ class CommonConfig(AppConfig):
name = 'common'
def ready(self):
from . import signals_handlers
from . import signal_handlers
from .signals import django_ready
if 'migrate' in sys.argv or 'compilemessages' in sys.argv:
return

View File

@ -2,7 +2,7 @@
`m2m_changed`
```
def m2m_signals_handler(action, instance, reverse, model, pk_set, using):
def m2m_signal_handler(action, instance, reverse, model, pk_set, using):
pass
```
"""

View File

@ -49,7 +49,7 @@ def on_site_message_create(sender, instance, created, **kwargs):
new_site_msg_chan.publish(data)
@receiver(post_migrate, dispatch_uid='notifications.signals_handler.create_system_messages')
@receiver(post_migrate, dispatch_uid='notifications.signal_handlers.create_system_messages')
def create_system_messages(app_config: AppConfig, **kwargs):
try:
notifications_module = import_module('.notifications', app_config.module.__package__)