qcg.pilotjob.resume module
- class qcg.pilotjob.resume.StateTracker(path)
Bases:
objectThis class traces incoming requests and job status changes to record current state which can be used to resume prematurely interrupted execution of QCG-Pilot job service.
Initialize state tracker.
- reqs_file
- Type
str
- finished_file
- Type
str
- Parameters
saved (* path - path to the directory where tracker files will be) – will be used
None (if) – will be used
directory (the current working) – will be used
- static resume(path, manager, progress=False)
Resume interrupted task iterations execution.
- Parameters
path (*) –
manager (*) –
- new_submited_jobs(jobs)
Register new submit job request. The new request is appended to all previous requests in the
self.reqs_filefile.- Parameters
jobs (*) –
- job_finished(job, iteration)
Register finished job status change. In case of final task (iterations) status change (SUCCEED, FAILED, CANCELED, OMITTED) task identifier with the final state is saved to the
self.finished_filefile.- Parameters
job (*) –
iteration (*) –
- all_jobs_finished()
All submited job’s finished successfully. The tracker files should be removed.