diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-29 11:00:01 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-29 11:00:01 +0800 |
| commit | 9d3c7500ee39e1e4c757176b5a41ce918072e093 (patch) | |
| tree | fe499785e9abf78372038a0f9b46cc4dba086ff7 /src/mic_clipper/service.py | |
| parent | b927b2c2746efaf7f91d03cec1c123a3d52bf62b (diff) | |
| download | mic-clipper-9d3c7500ee39e1e4c757176b5a41ce918072e093.tar.gz | |
[Problem]
- The installed user service fails before recording starts.
[Root Cause]
- The unit invokes the package without its CLI module and places StartLimit directives in [Service].
[Solution]
- Invoke mic_clipper.cli and move StartLimit directives to [Unit].
- Cover both rendered-unit requirements with the service test.
[Impact]
- The service template and its regression test are updated.
Diffstat (limited to 'src/mic_clipper/service.py')
| -rw-r--r-- | src/mic_clipper/service.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mic_clipper/service.py b/src/mic_clipper/service.py index ecf5673..2b10710 100644 --- a/src/mic_clipper/service.py +++ b/src/mic_clipper/service.py @@ -17,18 +17,18 @@ def render_unit(python: Path, project_root: Path) -> str: Description=Offline voice-activated microphone clip recorder Wants=pipewire.service wireplumber.service pipewire-pulse.service After=pipewire.service wireplumber.service pipewire-pulse.service +StartLimitIntervalSec=300 +StartLimitBurst=10 [Service] Type=simple WorkingDirectory={project_root} Environment=PYTHONPATH={project_root / 'src'} -ExecStart={python} -m mic_clipper run +ExecStart={python} -m mic_clipper.cli run Restart=on-failure RestartSec=5s RestartSteps=5 RestartMaxDelaySec=60s -StartLimitIntervalSec=300 -StartLimitBurst=10 NoNewPrivileges=yes PrivateTmp=yes UMask=0077 |
