Skip to content

Commit

Permalink
Merge pull request #44 from jalons/feature_runner
Browse files Browse the repository at this point in the history
Add ability to run runners to pepper
  • Loading branch information
whiteinge committed Jul 9, 2015
2 parents e1b9592 + 82bbca6 commit 0a30899
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pepper/libpepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,26 @@ def lookup_jid(self, jid):
'''
Get job results
Wraps :meth:`low`.
Wraps :meth:`runner`.
'''

return self.runner('jobs.lookup_jid', jid='{0}'.format(jid))


def runner(self, fun, **kwargs):
'''
Run a single command using the ``runner`` client
Usage::
runner('jobs.lookup_jid', jid=12345)
'''
low = {
'client': 'runner',
'fun': 'jobs.lookup_jid',
'jid': jid
'fun': fun,
}

low.update(kwargs)

return self.low([low], path='/')

def login(self, username, password, eauth):
Expand Down

0 comments on commit 0a30899

Please sign in to comment.