Skip to content
Snippets Groups Projects
Commit 83cca84f authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added admin email as recipient.

parent 64610a90
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ class GroupRwExecutor(TaskExecutor): ...@@ -26,6 +26,8 @@ class GroupRwExecutor(TaskExecutor):
params["db"], params["db"],
1, 1,
1) 1)
params = config.loadSection("mail")
self.adminEmail = params["admin_email"]
params = config.loadSection("logging") params = config.loadSection("logging")
self.logger = logging.getLogger("GroupRwExecutor") self.logger = logging.getLogger("GroupRwExecutor")
logLevel = "logging." + params["log_level"] logLevel = "logging." + params["log_level"]
...@@ -50,7 +52,7 @@ class GroupRwExecutor(TaskExecutor): ...@@ -50,7 +52,7 @@ class GroupRwExecutor(TaskExecutor):
super(GroupRwExecutor, self).__init__() super(GroupRwExecutor, self).__init__()
def updateGroupRw(self): 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.setPhase(self.jobId, "EXECUTING")
self.dbConn.setStartTime(self.jobId) self.dbConn.setStartTime(self.jobId)
...@@ -70,7 +72,7 @@ class GroupRwExecutor(TaskExecutor): ...@@ -70,7 +72,7 @@ class GroupRwExecutor(TaskExecutor):
# Send e-mail notification # Send e-mail notification
m = Mailer() m = Mailer()
m.addRecipient("cristiano.urban@inaf.it") m.addRecipient(self.adminEmail)
if self.requestType == "GRPR_ADD": if self.requestType == "GRPR_ADD":
msg = f""" msg = f"""
Added '{self.realGroupName}' to 'group_read' for {self.vospacePath} and any child nodes. Added '{self.realGroupName}' to 'group_read' for {self.vospacePath} and any child nodes.
......
...@@ -35,6 +35,8 @@ class ImportExecutor(TaskExecutor): ...@@ -35,6 +35,8 @@ class ImportExecutor(TaskExecutor):
params.getint("port"), params.getint("port"),
params["user"], params["user"],
params["pkey_file_path"]) params["pkey_file_path"])
params = config.loadSection("mail")
self.adminEmail = params["admin_email"]
params = config.loadSection("logging") params = config.loadSection("logging")
self.logger = logging.getLogger("ImportExecutor") self.logger = logging.getLogger("ImportExecutor")
logLevel = "logging." + params["log_level"] logLevel = "logging." + params["log_level"]
...@@ -175,7 +177,7 @@ class ImportExecutor(TaskExecutor): ...@@ -175,7 +177,7 @@ class ImportExecutor(TaskExecutor):
# Send e-mail notification # Send e-mail notification
m = Mailer() m = Mailer()
m.addRecipient("cristiano.urban@inaf.it") m.addRecipient(self.adminEmail)
msg = f""" msg = f"""
[VOSpace import procedure summary] [VOSpace import procedure summary]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment