* Starts background task that updates configuration and pushes stats. * * Periodically polls for configuration updates, and pushes stats at * a fixed interval. * * @param {string} managementEndpoint API endpoint * @param {string} instanceId UUID of this deployment * @param {string} remoteToke
(
managementEndpoint, instanceId, remoteToken)
| 142 | * @returns {undefined} |
| 143 | */ |
| 144 | function startPollingManagementClient( |
| 145 | managementEndpoint, instanceId, remoteToken) { |
| 146 | metadata.notifyBucketChange(() => { |
| 147 | pushStats(managementEndpoint, instanceId, remoteToken); |
| 148 | }); |
| 149 | |
| 150 | pushStats(managementEndpoint, instanceId, remoteToken); |
| 151 | applyConfigurationOverlay(managementEndpoint, instanceId, remoteToken, |
| 152 | logger.newRequestLogger()); |
| 153 | } |
| 154 | |
| 155 | module.exports = { |
| 156 | startPollingManagementClient, |
no test coverage detected