diff options
author | makkalot <makkalot@gmail.com> | 2008-07-17 11:50:44 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-07-17 11:50:44 +0300 |
commit | 010cb16064a473758a5bc01e6c5080a031bf26c9 (patch) | |
tree | d0349a725d3e745f405e7cdd583a6d0f153732e6 /func/overlord/client.py | |
parent | 241ae0393defac1c28b58ef79c0d585bc8d7b349 (diff) | |
download | func-010cb16064a473758a5bc01e6c5080a031bf26c9.tar.gz func-010cb16064a473758a5bc01e6c5080a031bf26c9.tar.xz func-010cb16064a473758a5bc01e6c5080a031bf26c9.zip |
adding the open_ids part to the overlord class
Diffstat (limited to 'func/overlord/client.py')
-rwxr-xr-x | func/overlord/client.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/func/overlord/client.py b/func/overlord/client.py index 4cb8216..cc5fe1e 100755 --- a/func/overlord/client.py +++ b/func/overlord/client.py @@ -244,6 +244,13 @@ class Overlord(object): # ----------------------------------------------- + def open_job_ids(self): + """ + That method can be used by other apps that uses func API + to get current ids with their short results in the database + """ + return jobthing.get_open_ids() + def run(self, module, method, args, nforks=1): """ Invoke a remote method on one or more servers. @@ -358,14 +365,18 @@ class Overlord(object): else: #we're directly calling minions, so treat everything normally spec = self.server_spec minionurls = self.minions + #print "Minion_url is :",minionurls + #print "Process server is :",process_server if not self.noglobs: if self.nforks > 1 or self.async: # using forkbomb module to distribute job over multiple threads if not self.async: + results = forkbomb.batch_run(minionurls, process_server, nforks) else: - results = jobthing.batch_run(minionurls, process_server, nforks) + minion_info =dict(spec=spec,module=module,method=method) + results = jobthing.batch_run(minionurls, process_server,nforks,**minion_info) else: # no need to go through the fork code, we can do this directly results = {} |