Changeset View
Changeset View
Standalone View
Standalone View
swh/web/inbound_email/signals.py
# Copyright (C) 2022 The Software Heritage developers | # Copyright (C) 2022 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from enum import Enum, auto | from enum import Enum, auto | ||||
import django.dispatch | import django.dispatch | ||||
email_received = django.dispatch.Signal(providing_args=["message"]) | email_received = django.dispatch.Signal() | ||||
"""This signal is sent by the `process_inbound_email` management command. | """This signal is sent by the `process_inbound_email` management command. | ||||
Arguments: | Arguments: | ||||
message (:class:`email.message.EmailMessage`): the inbound email message | message (:class:`email.message.EmailMessage`): the inbound email message | ||||
Signal receivers must return an :class:`EmailProcessingStatus` value so that the | Signal receivers must return an :class:`EmailProcessingStatus` value so that the | ||||
management command knows if the email has been processed. | management command knows if the email has been processed. | ||||
Show All 18 Lines |