예제 #1
0
 def update_job_on_initiator(cls, initiator_job: Job, update_fields: list):
     jobs = JobSaver.query_job(job_id=initiator_job.f_job_id)
     if not jobs:
         raise Exception("Failed to update job status on initiator")
     job_info = initiator_job.to_human_model_dict(only_primary_with=update_fields)
     for field in update_fields:
         job_info[field] = getattr(initiator_job, "f_%s" % field)
     for job in jobs:
         job_info["role"] = job.f_role
         job_info["party_id"] = job.f_party_id
         JobSaver.update_job_status(job_info=job_info)
         JobSaver.update_job(job_info=job_info)
예제 #2
0
 def create_job(cls, job: Job):
     return cls.job_command(job=job,
                            command="create",
                            command_body=job.to_human_model_dict(),
                            order_federated=True)
예제 #3
0
 def create_job(cls, job: Job):
     return cls.job_command(job=job,
                            command="create",
                            command_body=job.to_human_model_dict(),
                            parallel=False)