Commit 83cca84f authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added admin email as recipient.

parent 64610a90
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ class GroupRwExecutor(TaskExecutor):
                                  params["db"],
                                  1,
                                  1)
        params = config.loadSection("mail")
        self.adminEmail = params["admin_email"]
        params = config.loadSection("logging")
        self.logger = logging.getLogger("GroupRwExecutor")
        logLevel = "logging." + params["log_level"]
@@ -50,7 +52,7 @@ class GroupRwExecutor(TaskExecutor):
        super(GroupRwExecutor, self).__init__()

    def updateGroupRw(self):
        """This method adds/removes groups to group_read and group_write."""
        """This method adds/removes groups to/from 'group_read' and 'group_write'."""

        self.dbConn.setPhase(self.jobId, "EXECUTING")
        self.dbConn.setStartTime(self.jobId)
@@ -70,7 +72,7 @@ class GroupRwExecutor(TaskExecutor):
        
        # Send e-mail notification
        m = Mailer()
        m.addRecipient("cristiano.urban@inaf.it")
        m.addRecipient(self.adminEmail)
        if self.requestType == "GRPR_ADD":
            msg = f"""
Added '{self.realGroupName}' to 'group_read' for {self.vospacePath} and any child nodes.
+3 −1
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ class ImportExecutor(TaskExecutor):
                                     params.getint("port"),
                                     params["user"],
                                     params["pkey_file_path"])
        params = config.loadSection("mail")
        self.adminEmail = params["admin_email"]
        params = config.loadSection("logging")
        self.logger = logging.getLogger("ImportExecutor")
        logLevel = "logging." + params["log_level"]
@@ -175,7 +177,7 @@ class ImportExecutor(TaskExecutor):

        # Send e-mail notification
        m = Mailer()
        m.addRecipient("cristiano.urban@inaf.it")
        m.addRecipient(self.adminEmail)
        msg = f"""
        [VOSpace import procedure summary]