NXP-26151, we need to periodically refresh the WOPI discovery.
At the WOPIService startup, if the discovery data exists in the KeyValue store, after loading it, send a refreshWOPIDiscovery event to trigger an asynchronous work to refresh the discovery.
A scheduler running every 24 h also sends the refreshWOPIDiscovery event.
The asynchronous work listening to refreshWOPIDiscovery, if there is no data in the KeyValue store or it has expired, must:
- Fetch the discovery XML file.
- Load the data in memory.
- Update the KeyValue store.
- Use the PubSubService to notify the WOPIService, see MigrationServiceImpl#MigrationInvalidator.