Skip to content

Add automatic ingestion scheduling (server-side + client push) #103

Description

@evansenter

Problem

Ingestion only runs lazily via ensure_fresh_data() inside query tools. If no queries are made, data goes stale indefinitely — last ingestion was Jan 31 despite the server being active.

Additionally, client machines (Mac) have no automated push schedule to sync their local session data to the server.

Solution

Part 1: Server-side background ingestion

Add a FastMCP lifespan with a background asyncio task that runs ingest_logs() every 5 minutes, plus initial ingest on startup.

Part 2: Client-side scheduled push

Add LaunchAgent (macOS) and systemd timer (Linux) templates for periodic agent-session-analytics-cli push, wired into make install-client.

Files

  • server.py — lifespan + background loop
  • New push schedule templates (plist, systemd timer/service)
  • New install/uninstall scripts
  • Makefile update
  • Documentation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions