-
Notifications
You must be signed in to change notification settings - Fork 79
/
tasks.py
executable file
·17 lines (11 loc) · 987 Bytes
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from celery import shared_task
from interlink.models import MailingList, IncomingMail, OutgoingMail
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
@shared_task(ignore_result=True)
def email_task():
#logger = email_task.get_logger()
MailingList.objects.fetch_all_mail(logger)
IncomingMail.objects.process_incoming()
OutgoingMail.objects.send_outgoing()
# Copyright 2021 Office Nomads LLC (https://officenomads.com/) Licensed under the AGPL License, Version 3.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.gnu.org/licenses/agpl-3.0.html. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.