added get_job_list to jsonrpc and to the client for testing; works!
This commit is contained in:
parent
a15a9dc735
commit
b731d09d35
2 changed files with 4 additions and 11 deletions
|
|
@ -24,10 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
from bjsonrpc import connect
|
||||
|
||||
c = connect()
|
||||
time1 = c.call.time()
|
||||
# do something here ...
|
||||
print "Time:", time1
|
||||
print "Delta:", c.call.delta(time1)
|
||||
|
||||
print c.call.get_job_list()
|
||||
|
||||
print c.call.get_job_info_by_id("3bf60380")
|
||||
|
||||
|
|
|
|||
|
|
@ -56,14 +56,9 @@ class ServerHandler(BaseHandler):
|
|||
interface = None
|
||||
config = None
|
||||
|
||||
def time(self):
|
||||
return time.time()
|
||||
|
||||
def delta(self, start):
|
||||
return time.time() - start
|
||||
|
||||
def get_job_list(self):
|
||||
pass
|
||||
job_list = ServerHandler.interface.get_job_list()
|
||||
return json.dumps(job_list, ensure_ascii=False)
|
||||
|
||||
def get_job_info_by_id(self, job_hex):
|
||||
job = ServerHandler.interface.find_job_by_hex_string(job_hex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue