示例#1
0
        public async Task Run([TimerTrigger("0 */30 * * * *", RunOnStartup = true)] TimerInfo myTimer)
        {
            var databaseOkay = await _healthService.DatabaseOkayAsync();

            var selfMonitoringStringBuilder = new StringBuilder($"Self check started at {DateTime.UtcNow}: ");

            selfMonitoringStringBuilder.Append(GenerateKeyValue("Database", databaseOkay));

            _logger.LogWarning(selfMonitoringStringBuilder.ToString());
        }