some more debug stuff and set rcpt to _rcpt in json files to not get spammed by mails while testing
This commit is contained in:
parent
737d65ccd5
commit
23a1a246cc
4 changed files with 5 additions and 3 deletions
|
|
@ -12,7 +12,7 @@
|
||||||
"root":{
|
"root":{
|
||||||
"name": "root",
|
"name": "root",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{ "class":"mail", "type": "foo", "args": { "rcpt": "hanez@linspector.org" }}
|
{ "class":"mail", "type": "foo", "args": { "_rcpt": "hanez@linspector.org" }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"hanez":{
|
"hanez":{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{ "class":"mail", "type": "foo", "args": { "rcpt": "hanez@linspector.org" }}
|
{ "class":"mail", "type": "foo", "args": { "_rcpt": "hanez@linspector.org" }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ class MailTask(Task):
|
||||||
|
|
||||||
def execute(self, msg, taskArgs):
|
def execute(self, msg, taskArgs):
|
||||||
if "rcpt" not in taskArgs:
|
if "rcpt" not in taskArgs:
|
||||||
raise "could not execute Mail Task! No recipient given!"
|
logger.debug("Could not execute Mail Task! No recipient given!")
|
||||||
|
raise "Could not execute Mail Task! No recipient given!"
|
||||||
|
|
||||||
logger.debug("Eecuting Task!")
|
logger.debug("Eecuting Task!")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ class TaskList(object):
|
||||||
logger.debug("Starting Task Execution...")
|
logger.debug("Starting Task Execution...")
|
||||||
task.execute(msg, taskInfo["args"])
|
task.execute(msg, taskInfo["args"])
|
||||||
except:
|
except:
|
||||||
|
logger.debug("Something failed!")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def find_task_by_name(self, clazzName):
|
def find_task_by_name(self, clazzName):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue