Ejemplo n.º 1
0
def connect_signals(**kwargs):
    """
    Listens to the ``initializing`` signal and tells other modules to
    connect their signals. This is done so as to guarantee that django
    is loaded first.
    """
    from labinventory.notifications import email, core, event

    email.connect_signals()
    core.connect_signals()
Ejemplo n.º 2
0
def on_process_worker_init(*args, **kwargs): #IGNORE:W0613
    '''
    Ran at celery worker init.
    '''
    from labinventory.notifications import email
    email.connect_signals()
    try:
        from Crypto.Random import atfork
        atfork()
    except ImportError:
        pass