Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SERVICES-2668] Rest endpoints for managing indexing sessions #1516

Open
wants to merge 3 commits into
base: SERVICES-2655-migrate-code-from-mx-exchange-analytics-indexer
Choose a base branch
from

Conversation

mad2sm0key
Copy link
Contributor

@mad2sm0key mad2sm0key commented Oct 23, 2024

Reasoning

  • indexing analytics is a long-running task; provide a mechanism for triggering and managing indexing through rest endpoints

Proposed Changes

  • add IndexerSession schema to be persisted in mongoDB. A session can contain multiple indexing jobs (1 week intervals)
  • add controller with rest endpoints for managing indexing sessions; for simplicity, a limitation of a single active indexing session at a time is imposed
  • expose the analytics indexer controller in the private app
  • NOTE: indesing sessions are meant to be state machines. Their state will be updated by a cron-job (future PR)

How to test

  • GET /analytics-indexer/sessions should return a list of all the indexing sessions
  • GET /analytics-indexer/sessions/:nameOrID should return a single indexing session
  • POST /analytics-indexer/sessions for creating a new indexing session
  • POST /analytics-indexer/sessions/:nameOrID/abort for aborting an active session

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.

2 participants