def handle_noargs(self, **options):
        translation.activate(settings.LANGUAGE_CODE)

        logging.basicConfig(level=logging.DEBUG, format="%(message)s")
        logging.info("-" * 72)
        send_all()

        translation.deactivate()
Esempio n. 2
0
def send_queued_notifications(*args):
    """
    Sends queued notifications.

    settings.PINAX_NOTIFICATIONS_QUEUE_ALL needs to be true in order to take advantage of this.
    """

    try:
        from notification.engine import send_all
    except ImportError:
        return

    # Make sure the application can write to the location where lock files are stored.
    if not args and getattr(settings, 'NOTIFICATION_LOCK_LOCATION', None):
        send_all(settings.NOTIFICATION_LOCK_LOCATION)
    else:
        send_all(*args)
Esempio n. 3
0
 def handle_noargs(self, **options):
     logging.basicConfig(level=logging.DEBUG, format="%(message)s")
     logging.info("-" * 72)
     send_all()
Esempio n. 4
0
def emit_notices():
    send_all()
Esempio n. 5
0
def emit_notices():
    """Don't fire this too often if using multiple celery workers - the send_all
    engine is not safe to use cross-machine, since the lock it uses is on a
    local disk.
    """
    send_all()
Esempio n. 6
0
 def handle_noargs(self, **options):
     send_all()
 def handle_noargs(self, **options):
     logging.basicConfig(level=logging.DEBUG, format="%(message)s")
     logging.info("-" * 72)
     send_all()
Esempio n. 8
0
def emit_notices():
    """Don't fire this too often if using multiple celery workers - the send_all
    engine is not safe to use cross-machine, since the lock it uses is on a
    local disk.
    """
    send_all()
Esempio n. 9
0
 def handle(self, *args, **options):
     # Franku: Uncomment for debugging purposes
     # logging.basicConfig(level=logging.DEBUG, format='%(message)s')
     logging.info('-' * 72)
     send_all()
Esempio n. 10
0
def emit_notifications():
    logger.info('notifications emitting')
    return send_all()
Esempio n. 11
0
def emit_notices():
    celery_logger.info("Emitting notices ...")
    send_all()
Esempio n. 12
0
 def handle(self, *args, **options):
     logging.basicConfig(level=logging.DEBUG, format="%(message)s")
     logging.info("-" * 72)
     send_all(workers=options['workers'], processes=options['processes'])