예제 #1
0
    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()
예제 #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)
예제 #3
0
파일: emit_notices.py 프로젝트: 3241966/PMS
 def handle_noargs(self, **options):
     logging.basicConfig(level=logging.DEBUG, format="%(message)s")
     logging.info("-" * 72)
     send_all()
예제 #4
0
def emit_notices():
    send_all()
예제 #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()
예제 #6
0
 def handle_noargs(self, **options):
     send_all()
예제 #7
0
 def handle_noargs(self, **options):
     logging.basicConfig(level=logging.DEBUG, format="%(message)s")
     logging.info("-" * 72)
     send_all()
예제 #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()
예제 #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()
예제 #10
0
def emit_notifications():
    logger.info('notifications emitting')
    return send_all()
예제 #11
0
파일: misc_tasks.py 프로젝트: PLOS-Web/AI
def emit_notices():
    celery_logger.info("Emitting notices ...")
    send_all()
예제 #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'])