mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-07-06 01:42:41 +02:00
refactor: companion FrameServer and related (substantive only, no Black)
Reapply refactor from ce8381a (replace monolithic FrameServer with thin pymc_core subclass, re-export constants, SQLite persistence hooks) while preserving pre-refactor whitespace where patch applied cleanly. Remaining files match refactor commit exactly. Diff vs ce8381a is whitespace-only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Service management utilities for pyMC Repeater.
|
||||
Provides functions for service control operations like restart.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import subprocess
|
||||
from typing import Tuple
|
||||
@@ -21,12 +22,9 @@ def restart_service() -> Tuple[bool, str]:
|
||||
"""
|
||||
try:
|
||||
result = subprocess.run(
|
||||
['systemctl', 'restart', 'pymc-repeater'],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=5
|
||||
["systemctl", "restart", "pymc-repeater"], capture_output=True, text=True, timeout=5
|
||||
)
|
||||
|
||||
|
||||
if result.returncode == 0:
|
||||
logger.info("Service restart command executed successfully")
|
||||
return True, "Service restart initiated"
|
||||
|
||||
Reference in New Issue
Block a user