コード例 #1
0
ファイル: __init__.py プロジェクト: jonozzz/iRack
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()
コード例 #2
0
ファイル: tasks.py プロジェクト: jonozzz/iRack
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