ReadAndSaveTmp.py 773 B

12345678910111213141516171819202122
  1. from trans.ExecParam import ExecParam
  2. from trans.common.Axis0DataImpl import Axis0DataImpl
  3. from trans.common.Axis1DataImpl import Axis1DataImpl
  4. class ReadAndSaveTmp(object):
  5. def __init__(self, id, process_count, now_count, exec_param: ExecParam, save_db=True):
  6. self.id = id
  7. self.process_count = process_count
  8. self.now_count = now_count
  9. self.exec_param = exec_param
  10. self.save_db = save_db
  11. def run(self):
  12. if self.exec_param.join_type == 0:
  13. run_process = Axis0DataImpl(self.id, self.process_count, self.now_count, self.exec_param, self.save_db)
  14. else:
  15. run_process = Axis1DataImpl(self.id, self.process_count, self.now_count, self.exec_param, self.save_db)
  16. run_process.run()