Commit 6fbadd36 authored by MERCIER Michael's avatar MERCIER Michael

Add progress property to killed jobs

parent 05317612
......@@ -379,6 +379,14 @@ class Job:
result.append(dep)
return ListView(result)
@property
def progress(self):
return self._batsim_job.progress
@progress.setter
def progress(self, value):
self._batsim_job.progress = value
def free(self):
"""Free the current allocation of this job."""
assert self._batsim_job, "Batsim job is not set => job was not correctly initialised"
......
......@@ -83,7 +83,8 @@ class BaseBatsimScheduler(BatsimScheduler):
for job in jobs:
jobobj = self._jobmap[job.id]
del self._jobmap[job.id]
jobobjs.append(job)
jobobj.progress = job.progress
jobobjs.append(jobobj)
self._scheduler.info("The following jobs were killed: ({jobs})",
jobs=jobobjs, type="jobs_killed_received")
......
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