base_task.py 541 B

1234567891011121314151617181920212223
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from datetime import datetime
  5. from module.config.config import Config
  6. from module.device.device import Device
  7. class BaseTask:
  8. config: Config = None
  9. device: Device = None
  10. folder: str
  11. name: str
  12. stage: str
  13. limit_time: datetime # 限制运行的时间,是软时间,不是硬时间
  14. def __init__(self, config: Config, device: Device) -> None:
  15. self.config = config
  16. self.device = device