script_task.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.config import RichMan
  10. from tasks.RichMan.mall.mall import Mall
  11. from tasks.RichMan.guild import Guild
  12. from tasks.RichMan.shrine import Shrine
  13. from tasks.RichMan.thousand_things import ThousandThings
  14. class ScriptTask(Mall, Guild, ThousandThings, Shrine):
  15. def run(self):
  16. con: RichMan = self.config.rich_man
  17. self.execute_tt(con.thousand_things)
  18. self.execute_shrine(con.shrine)
  19. self.execute_guild(con.guild_store)
  20. self.execute_mall()
  21. self.set_next_run(task='RichMan', success=True, finish=False)
  22. raise TaskEnd('RichMan')
  23. if __name__ == '__main__':
  24. from module.config.config import Config
  25. from module.device.device import Device
  26. from memory_profiler import profile
  27. c = Config('oas1')
  28. d = Device(c)
  29. t = ScriptTask(c, d)
  30. t.execute_mall()