def delete_finished(): """Delete finished executions from Zoe.""" exec_api = ZoeExecutionsAPI(zoe_url(), zoe_user(), zoe_pass()) execs = exec_api.list() for e_id in execs: e = exec_api.get(e_id) if e['name'] == 'boinc-loader' and e['status'] == 'terminated': print('Execution {} has finished, deleting...'.format(e_id)) exec_api.delete(e['id'])
def delete_finished(): """Delete finished executions from Zoe.""" exec_api = ZoeExecutionsAPI(zoe_url(), zoe_user(), zoe_pass()) execs = exec_api.list() for e_id in execs: e = exec_api.get(e_id) if e is None: continue if e['name'] == 'boinc-loader' and e['status'] == 'terminated': print('Execution {} has finished, deleting...'.format(e_id)) exec_api.delete(e['id'])
def exec_rm_cmd(auth, args): """Delete an execution and kill it if necessary.""" exec_api = ZoeExecutionsAPI(auth['url'], auth['user'], auth['pass']) exec_api.delete(args.id)
def exec_rm_cmd(args): """Delete an execution and kill it if necessary.""" exec_api = ZoeExecutionsAPI(utils.zoe_url(), utils.zoe_user(), utils.zoe_pass()) exec_api.delete(args.id)