public async Task Run([TimerTrigger("0 */6 * * * *", RunOnStartup = true)] TimerInfo myTimer) { var cacheUpdateDisabled = _configuration[ConfigConstants.DISABLE_CACHE_UPDATE]; if (!String.IsNullOrWhiteSpace(cacheUpdateDisabled) && cacheUpdateDisabled.ToLower() == "true") { _logger.LogWarning($"Cache update is disabled, aborting!"); return; } await _virtualMachineSizeImportService.UpdateVmSizeCache(); await _virtualMachineDiskSizeImportService.Import(); }
public async Task <IActionResult> UpdateVmSizeCache(CancellationToken cancellationToken = default) { await _virtualMachineSizeImportService.UpdateVmSizeCache(cancellationToken); return(new NoContentResult()); }