Add dashboard syncing in background goroutine #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an option of running the dashboard syncing process inside the plugin in a background goroutine.
The big disadvantage is that the process isn't started until the first time the plugin is called for any reason, e.g. a health check or a metrics call. (This might actually help if we did end up choosing to run this in cloud though, because we could have better control over when the processes started running, rather than it just being arbitrary depending when the Grafana instance restarts).
It's good enough to run once and get some data synchronised into qdrant/vectorapi, at least! To test, run
mage && npm install && npm build && docker-compose up -d --build
locally then: