-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist-all-faculty.py
executable file
·39 lines (31 loc) · 1.04 KB
/
list-all-faculty.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
34
35
36
37
38
39
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from google_group_lib import googLib
import log
logger = log.setup_custom_logger('root')
#
# Mail List Shell. Use this file to create new lists.
#
# Name of mail list. This should mirror Group email address in settings
listname = '[email protected]'
logger.info(listname + ' Starting List processing')
# next is the sql. This should be a query that returns email address
# This should call a view in schema sbcc_listsrv
sql = """
select EMAIL_ADDRESS from GV_MASTER_LIST_GG where LIST_FACULTY_FT = 'Y' or LIST_FACULTY_ADJ='Y' or LIST_FACULTY_NC = 'Y' or LIST_MANAGER = 'Y'
union
select '[email protected]' from dual
union
select '[email protected]' from dual
union
select '[email protected]' from dual
union
select '[email protected]' from dual
union
select '[email protected]' from dual
union
select '[email protected]' from dual
"""
#Inistate processing
_list = googLib(listname,sql)
logger.info(listname + ' List processing complete')