1# Copyright 2015 The Distro Tracker Developers
2# See the COPYRIGHT file at the top-level directory of this distribution and
3# at https://deb.li/DTAuthors
4#
5# This file is part of Distro Tracker. It is subject to the license terms
6# in the LICENSE file found in the top-level directory of this
7# distribution and at https://deb.li/DTLicense. No part of Distro Tracker,
8# including this file, may be copied, modified, propagated, or distributed
9# except according to the terms contained in the LICENSE file.
10"""
11Implements the management command to process mails from the mail queue.
12"""
13from django.core.management.base import BaseCommand
15from distro_tracker.mail.processor import MailQueue
18class Command(BaseCommand):
19 """
20 A Django management command used to run a daemon handling the mail queue.
21 """
22 def handle(self, *args, **kwargs):
23 queue = MailQueue()
24 queue.process_loop() # Never returns