Skip to content

feat(serve): run taosmd serve as a persistent background service (systemd/launchd/Windows) - #132

Merged
jaylfc merged 1 commit into
masterfrom
feat/serve-service
Jun 7, 2026
Merged

feat(serve): run taosmd serve as a persistent background service (systemd/launchd/Windows)#132
jaylfc merged 1 commit into
masterfrom
feat/serve-service

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Lets users run the local memory HTTP API / dashboard as an always-on background service, so the live (SSE-backed) inspector is persistently available without manually launching taosmd serve.

What

  • New taosmd serve flags (mutually exclusive): --install-service, --uninstall-service, --service-status. They install/manage a service that runs taosmd serve with the same --host/--port/--data-dir you pass, then exit (no foreground server).
  • New module taosmd/service_install.py with pure rendering functions + platform dispatch (sys.platform):
    • Linux — systemd user unit at ~/.config/systemd/user/taosmd.service (Restart=on-failure, RestartSec=5), then systemctl --user daemon-reload + enable --now.
    • macOS — launchd LaunchAgent at ~/Library/LaunchAgents/com.taosmd.serve.plist (RunAtLoad, KeepAlive, logs under ~/Library/Logs/taosmd/), loaded via launchctl.
    • Windows — ships scripts/install-service.ps1 (Scheduled Task at logon, -Uninstall switch); the CLI prints clear instructions pointing to it rather than attempting install from Python.
  • docs/serve-service.md — per-platform install/uninstall/status, log locations, how to change host/port/data-dir, and the localhost-vs-LAN/no-auth security note.

Notes

  • Additive — foreground taosmd serve and all defaults unchanged. stdlib only, no new deps. subprocess called with explicit arg lists (never shell=True); graceful handling when systemctl/launchctl are absent.
  • 392 tests pass (338 prior + 54 new in tests/test_service_install.py, all hermetic — rendering tested as pure functions, writes under tmp_path, no real ~/.config/~/Library touched).

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 11 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a7564753-2322-492e-8b09-5d0ca84f4e8d

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab495f and 121423f.

📒 Files selected for processing (6)
  • README.md
  • docs/serve-service.md
  • scripts/install-service.ps1
  • taosmd/cli.py
  • taosmd/service_install.py
  • tests/test_service_install.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/serve-service

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jaylfc
jaylfc merged commit eba1660 into master Jun 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant