code: def run_once(self):
          
          self._capture_signals()
          self._start_monitor()
          try:
              self._run_worker()
          except KeyboardInterrupt:
              return
          finally:
              self._stop_monitor()
              self._restore_signals()
docs: Execute the worker once.
  
          This method will return after a file change is detected.