Explorar o código

Merge pull request #1008 from BluettDream/dev_fix_todev

change push to dev
huangrunheng hai 1 ano
pai
achega
f1ebafddfb
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 1
      module/server/updater.py
  2. 2 1
      script.py

+ 1 - 1
module/server/updater.py

@@ -67,7 +67,7 @@ class Updater(DeployConfig, GitManager, PipManager):
         log : str = subprocess.run(
             'git branch --show-current', capture_output=True, text=True, encoding="utf8", shell=True
         ).stdout
-        log.replace('\n', '')
+        log = log.replace('\n', '')
         return log
 
     def current_commit(self) -> str:

+ 2 - 1
script.py

@@ -315,7 +315,6 @@ class Script:
 
             if task.next_run > datetime.now():
                 logger.info(f'Wait until {task.next_run} for task `{task.command}`')
-                # self.is_first_task = False
                 method = self.config.script.optimization.when_task_queue_empty
                 if method == 'close_game':
                     logger.info('Close game during wait')
@@ -461,6 +460,8 @@ class Script:
                 continue
 
             # Run
+            if self.state_queue:
+                self.state_queue.put({"schedule": self.config.get_schedule_data()})
             logger.info(f'Scheduler: Start task `{task}`')
             self.device.stuck_record_clear()
             self.device.click_record_clear()