added the needs_arguments method to mail and mongodb task

This commit is contained in:
Johannes Findeisen 2013-11-23 01:26:53 +01:00
commit 880c45cd05
2 changed files with 6 additions and 0 deletions

View file

@ -64,6 +64,9 @@ class MailTask(Task):
if "password" in args: if "password" in args:
self.password = args["password"] self.password = args["password"]
def needs_arguments(self):
return True
def execute(self, job_information): def execute(self, job_information):
logger.debug("Executing Mail Task!") logger.debug("Executing Mail Task!")

View file

@ -55,6 +55,9 @@ class MongodbTask(Task):
self.mongo_db = self.mongo_client[self.database] self.mongo_db = self.mongo_client[self.database]
self.mongo_db_collection = self.mongo_db[self.collection] self.mongo_db_collection = self.mongo_db[self.collection]
def needs_arguments(self):
return True
def execute(self, job_information): def execute(self, job_information):
data = {"timestamp": str(datetime.datetime.now()), data = {"timestamp": str(datetime.datetime.now()),
"msg": job_information.get_response_message(), "msg": job_information.get_response_message(),