-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMailTrackHeadsPending.py
executable file
·33 lines (26 loc) · 1.08 KB
/
MailTrackHeadsPending.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Bep Marketplace ELE
# Copyright (c) 2016-2022 Kolibri Solutions
# License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE
#
"""
Mail all trackheads with the proposal that they have to check. (All pending proposals)
This script can be used to automatically mail track heads in (for instance) a cron job.
"""
from general_mail import mail_track_heads_pending
if __name__ == '__main__':
import django
import argparse
import sys
import os
parser = argparse.ArgumentParser(description="Load type1 from csv")
parser.add_argument('--mode', nargs='?', const=1, type=str, default='debug', help='debug/production')
parser.set_defaults(createDummyData=False)
MODE = parser.parse_args().mode
if MODE not in ["debug", "production"]:
sys.exit(1)
if MODE == 'debug':
os.environ['DJANGO_SETTINGS_MODULE'] = 'BepMarketplace.settings_development'
elif MODE == 'production':
os.environ['DJANGO_SETTINGS_MODULE'] = 'BepMarketplace.settings'
django.setup()
mail_track_heads_pending(stdout=True)