Closed nblago closed 5 years ago
The growth.py script now prints out the requestor's e-mail and the observation status. We need to implement actually sending an e-mail.
dqm_update 20: Now contains a simple function inside the class SedmDb to send different emails. It can be called as followed
x = SedmDB(host="pharos.caltech.edu") template_dict = {'object_name': 'Test', 'new_status': 'NEW', 'status_change_time': datetime.datetime.utcnow()}
x.send_email_by_request(to='user@email', subject="Test", template='status_update', template_dict=template_dict)
The templates are stored in the db/email_templates. Each template is expecting a dictionary that contains the keywords inside the {} brackets.
Is it ready for a pull request, or do you need to do more testing?
All the pieces are now in place to preform this action of reporting changes in states. We still need an institutional decision on whether to spam users with 5-6 updates/target request or if we just do one or two summary emails.
Send an email to the user that submitted the request once the request they submitted chagnes status: from PENDING to OBSERVED, REDUCED, COMPLETED, etc.