Commit | Line | Data |
---|---|---|
4b89a7df EMS |
1 | #!/usr/bin/env python |
2 | # -*- encoding: utf-8 -*- | |
3 | ||
4 | import sys, os, glob, time | |
5 | sys.path[0:0] = [ | |
6 | "%(directory)s", | |
7 | "%(directory)s/auf_savoirs_en_partage", | |
8 | ] | |
9 | os.environ['DJANGO_SETTINGS_MODULE'] = 'production' | |
10 | for d in glob.glob("%(directory)s/eggs/*"): | |
11 | sys.path[0:0] = [d,] | |
12 | for d in glob.glob("%(directory)s/parts/*"): | |
13 | sys.path[0:0] = [d,] | |
14 | ||
15 | from savoirs.models import Search | |
16 | ||
17 | recherches = Search.objects.filter(alerte_courriel=True) | |
18 | for recherche in recherches: | |
19 | recherche.send_email_alert() |