script_task.py 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from time import sleep
  5. from datetime import time, datetime, timedelta
  6. from module.logger import logger
  7. from module.exception import TaskEnd
  8. from tasks.RichMan.assets import RichManAssets
  9. from tasks.RichMan.mall.mall import Mall
  10. from tasks.RichMan.guild import Guild
  11. from tasks.RichMan.shrine import Shrine
  12. from tasks.RichMan.thousand_things import ThousandThings
  13. class ScriptTask(ThousandThings, Shrine, Guild, Mall, RichManAssets):
  14. def run(self):
  15. self.execute_tt()
  16. self.execute_shrine()
  17. self.execute_guild()
  18. self.execute_mall()
  19. self.set_next_run(task='RichMan', success=True, finish=False)
  20. raise TaskEnd('RichMan')
  21. if __name__ == '__main__':
  22. from module.config.config import Config
  23. from module.device.device import Device
  24. from memory_profiler import profile
  25. c = Config('oas1')
  26. d = Device(c)
  27. t = ScriptTask(c, d)