added __str__ to service and made the output look nicer in lishs jobs list
This commit is contained in:
parent
a7312cb37e
commit
c2275e8e63
1 changed files with 7 additions and 4 deletions
|
|
@ -54,9 +54,15 @@ class Service(object):
|
|||
if KEY_PERIODS in kwargs:
|
||||
self.add_periods(kwargs[KEY_PERIODS])
|
||||
|
||||
def __str__(self):
|
||||
return self.get_name() + " " + repr(self._args)
|
||||
|
||||
def get_type(self):
|
||||
return str(self.__class__)
|
||||
|
||||
def get_name(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
def add_arguments(self, args):
|
||||
for key, val in args.items():
|
||||
self._args[key] = val
|
||||
|
|
@ -127,9 +133,6 @@ class Service(object):
|
|||
self._threshold -= 1
|
||||
raise e
|
||||
|
||||
|
||||
|
||||
|
||||
def execute(self, jobInfo):
|
||||
pass
|
||||
|
||||
|
|
@ -145,4 +148,4 @@ class Service(object):
|
|||
return result
|
||||
|
||||
def post_execute(self, jobInfo):
|
||||
pass
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue