-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Some users need to periodically reload their indexer while it's running. Their use case is that the events they want to listen to depend on values from an external API.
User facing changes
I propose adding a new reloadIndexer() helper that signals to the runner to reload and restart the indexer.
Implementation
The helper function should simply throw a special error (ReloadIndexerRequest) that the outside components of the code can catch and handle:
- stop the existing indexer.
- reload the config (e.g. any call to
getRuntimeDataFromEnv()) - create a new indexer's instance
- run the new instance
I believe we need to change both the dev and start command.
Testing
We should ensure that calling this function results in the indexer's constructor being called. We should also ensure that in dev mode only the indexer that requested the restart is restarted.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request