Ejemplo n.º 1
0
 def notify_now(self, env):
     home_project = HomeProject()
     listofprojects = ""
     projects = self.get_notified_projects()
     for name in projects.keys():
         if projects[name].notifynow:
             listofprojects += name + self.tabspace(len(name)) + str(projects[name].totalsize) + "\n"
     if len(listofprojects) > 0:
         # TODO: Move into template
         message = "These projects exceeded system storage limit:\n(storage limit = " +\
                   str(long(conf.storage_locking_limit)) + " bytes)\n\n"
         message += listofprojects
         mail = EmailNotifier(env, "Project(s) exceeded storage limits", message)
         mail.notify_system_admins(home_project)
Ejemplo n.º 2
0
 def notify_now(self, env):
     home_project = HomeProject()
     listofprojects = ""
     projects = self.get_notified_projects()
     for name in projects.keys():
         if projects[name].notifynow:
             listofprojects += name + self.tabspace(len(name)) + str(
                 projects[name].totalsize) + "\n"
     if len(listofprojects) > 0:
         # TODO: Move into template
         message = "These projects exceeded system storage limit:\n(storage limit = " +\
                   str(long(conf.storage_locking_limit)) + " bytes)\n\n"
         message += listofprojects
         mail = EmailNotifier(env, "Project(s) exceeded storage limits",
                              message)
         mail.notify_system_admins(home_project)