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

Function stop_daemon

ci/util/pio_package_client.py:511–534  ·  view source on GitHub ↗

Stop the daemon gracefully. Returns: True if daemon was stopped, False otherwise

()

Source from the content-addressed store, hash-verified

509
510
511def stop_daemon() -> bool:
512 """Stop the daemon gracefully.
513
514 Returns:
515 True if daemon was stopped, False otherwise
516 """
517 if not is_daemon_running():
518 print("Daemon is not running")
519 return False
520
521 # Create shutdown signal file
522 shutdown_file = DAEMON_DIR / "shutdown.signal"
523 shutdown_file.touch()
524
525 # Wait for daemon to exit
526 print("Stopping daemon...")
527 for _ in range(10):
528 if not is_daemon_running():
529 print("✅ Daemon stopped")
530 return True
531 time.sleep(1)
532
533 print("⚠️ Daemon did not stop gracefully")
534 return False
535
536
537def get_daemon_status() -> dict[str, Any]:

Callers 2

mainFunction · 0.90
mainFunction · 0.85

Calls 2

is_daemon_runningFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected