def res(**kwargs): r = PKDict(**kwargs) if self.db.canceledAfterSecs is not None: r.canceledAfterSecs = self.db.canceledAfterSecs if self.db.error: r.error = self.db.error if self.db.alert: r.alert = self.db.alert if self.db.isParallel: r.update(self.db.parallelStatus) r.computeJobHash = self.db.computeJobHash r.computeJobSerial = self.db.computeJobSerial r.elapsedTime = self.elapsed_time() if self._is_running_pending(): c = req.content r.update( nextRequestSeconds=self.db.nextRequestSeconds, nextRequest=PKDict( computeJobHash=self.db.computeJobHash, computeJobSerial=self.db.computeJobSerial, computeJobStart=self.db.computeJobStart, report=c.analysisModel, simulationId=self.db.simulationId, simulationType=self.db.simulationType, ), ) return r
def res(**kwargs): r = PKDict(**kwargs) if self.db.error: r.error = self.db.error if self.db.isParallel: r.update(self.db.parallelStatus) r.computeJobHash = self.db.computeJobHash r.computeJobSerial = self.db.computeJobSerial r.elapsedTime = r.lastUpdateTime - self.db.computeJobStart if self.db.status in _RUNNING_PENDING: c = req.content r.update( nextRequestSeconds=self.db.nextRequestSeconds, nextRequest=PKDict( computeJobHash=self.db.computeJobHash, computeJobSerial=self.db.computeJobSerial, computeJobStart=self.db.computeJobStart, report=c.analysisModel, simulationId=self.db.simulationId, simulationType=self.db.simulationType, ), ) return r