Commit 0cdb7edb authored by Daniele Venzano's avatar Daniele Venzano

Fix bug in boinc script

parent 374998bd
......@@ -66,6 +66,8 @@ def count_jobs(all=False):
count = 0
for e_id in execs:
e = exec_api.get(e_id)
if e is None:
continue
if not all and e['name'] != 'boinc-loader':
continue
if e['status'] != 'terminated':
......@@ -79,7 +81,9 @@ def delete_finished():
execs = exec_api.list()
for e_id in execs:
e = exec_api.get(e_id)
if e is not None and e['name'] == 'boinc-loader' and e['status'] == 'terminated':
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'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment