Subversion Repositories SmartDukaan

Rev

Rev 3200 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3200 Rev 7609
Line 1... Line 1...
1
#!/usr/bin/python
1
#!/usr/bin/python
2
import sys
2
import sys
-
 
3
from shop2020.utils.EmailAttachmentSender import mail
3
 
4
 
4
if __name__ == '__main__' and __package__ is None:
5
if __name__ == '__main__' and __package__ is None:
5
    import os
6
    import os
6
    sys.path.insert(0, os.getcwd())
7
    sys.path.insert(0, os.getcwd())
7
 
8
 
8
from shop2020.clients.CatalogClient import CatalogClient
9
from shop2020.clients.CatalogClient import CatalogClient
9
 
10
 
10
def notify():
11
def notify():
-
 
12
    try:
11
    client = CatalogClient().get_client()
13
        client = CatalogClient().get_client()
12
    client.sendProductNotifications()
14
        client.sendProductNotifications()
13
    print "Product notifications sending completed"
15
        print "Product notifications sending completed"
-
 
16
    except:
-
 
17
        mail('cnc.center@shop2020.in', '5h0p2o2o', ['rajveer.singh@shop2020.in','amit.gupta@shop2020.in','rajneesh.arora@shop2020.in'], "Email Notifier Failed", "Email Notifier Failed", [], [], [])
14
            
18
            
15
def main():
19
def main():
16
    notify()
20
    notify()
17
 
21
 
18
if __name__ == '__main__':
22
if __name__ == '__main__':