MCPcopy Create free account
hub / github.com/FastLED/FastLED / should_shutdown

Function should_shutdown

ci/util/pio_package_daemon.py:716–734  ·  view source on GitHub ↗

Check if daemon should shutdown. Returns: True if shutdown signal detected, False otherwise

()

Source from the content-addressed store, hash-verified

714
715
716def should_shutdown() -> bool:
717 """Check if daemon should shutdown.
718
719 Returns:
720 True if shutdown signal detected, False otherwise
721 """
722 # Check for shutdown signal file
723 shutdown_file = DAEMON_DIR / "shutdown.signal"
724 if shutdown_file.exists():
725 logging.info("Shutdown signal detected")
726 try:
727 shutdown_file.unlink()
728 except KeyboardInterrupt as ki:
729 handle_keyboard_interrupt(ki)
730 raise
731 except Exception:
732 pass
733 return True
734 return False
735
736
737def signal_handler(signum: int, frame: object) -> None:

Callers 1

run_daemon_loopFunction · 0.85

Calls 3

unlinkMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected