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:
Johannes Findeisen 2013-11-03 22:30:51 +01:00
commit 23a1a246cc
4 changed files with 5 additions and 3 deletions

View file

@ -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" }}
] ]
} }
}, },

View file

@ -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" }}
] ]
} }
}, },

View file

@ -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!")

View file

@ -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):