Esempio n. 1
0
 def spider_closed(self, spider):
     """
     Email all the gigs that should be sent, and record that they were sent.
     """
     new_email = Email()
     message = new_email.build_message_from_gigs(self.gigs_to_send)
     new_email.send(settings.TO_EMAIL, message)
     # loop back through and save each one as sent.
     self.record_sent_gigs(self.gigs_to_send)
     self.cursor.close()