cleanup
This commit is contained in:
parent
a48b5feaa4
commit
97b3d6a5ba
4 changed files with 2 additions and 5 deletions
|
|
@ -53,7 +53,7 @@ class Job:
|
|||
UNKNOWN when a job throws an exception which is not handled by the job itself (not implemented)
|
||||
"""
|
||||
self.status = "NONE"
|
||||
self.response = None
|
||||
self.last_execution = None
|
||||
|
||||
def __str__(self):
|
||||
return str(self.__dict__)
|
||||
|
|
@ -171,7 +171,7 @@ class JobExecution(object):
|
|||
self.kwargs = kwargs
|
||||
|
||||
def get_response_message(self, job):
|
||||
msg = str(job.status) + " [CLASS: " + str(job.jobHex) + "] " + \
|
||||
msg = str(job.status) + " [" + job.service.get_config_name() + ": " + str(job.jobHex) + "] " + \
|
||||
str(job.get_hostgroup()) + " " + str(job.get_host())
|
||||
if self.get_message() is not None:
|
||||
msg += " Message:" + str(self.get_message())
|
||||
|
|
|
|||
|
|
@ -78,6 +78,5 @@ class DummyService(Service):
|
|||
execution.set_result(error_code, msg, d)
|
||||
|
||||
|
||||
|
||||
def create(kwargs):
|
||||
return DummyService(**kwargs)
|
||||
|
|
@ -31,7 +31,6 @@ logger = getLogger(__name__)
|
|||
|
||||
class Service(object):
|
||||
def __init__(self, **kwargs):
|
||||
self.name = None
|
||||
self._args = {}
|
||||
if KEY_ARGS in kwargs:
|
||||
self.add_arguments(kwargs[KEY_ARGS])
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ logger = getLogger(__name__)
|
|||
|
||||
class Task(object):
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
self._args = {}
|
||||
if KEY_ARGS in kwargs:
|
||||
self.add_arguments(kwargs[KEY_ARGS])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue