def _start_step(self, job_id, **kwargs): with transaction.commit_on_success(): result = StepResult(job_id=job_id, **kwargs) result.save() self._job_to_result[job_id] = result