Skip to content

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

Open
mad2sm0key wants to merge 3 commits intoSERVICES-2655-migrate-code-from-mx-exchange-analytics-indexerfrom
SERVICES-2668-rest-endpoints-for-managing-indexing
Open

[SERVICES-2668] Rest endpoints for managing indexing sessions#1516
mad2sm0key wants to merge 3 commits intoSERVICES-2655-migrate-code-from-mx-exchange-analytics-indexerfrom
SERVICES-2668-rest-endpoints-for-managing-indexing

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