Example #1
0
        public static void Run([TimerTrigger("*/30 * * * * *")] TimerInfo myTimer, ILogger logger)
        {
            // CRON expression syntax: <second> <minute> <hour> <day-of-month> <month> <day-of-week> <year> <command>

            AppInsightsLogger appInsightsLogger = new AppInsightsLogger(logger, LOGGING_SERVICE_NAME, LOGGING_SERVICE_VERSION);
            QueueLogger       queueLogger       = new QueueLogger(appInsightsLogger);

            queueLogger.LogQueueLength(BACKEND_STATUS_CREATED_PATTERN, adjustment: 1);  // Add 1 so that we account for > 1 waiting.
        }
        public static void Run([TimerTrigger("0 */5 * * * *")] TimerInfo myTimer, ILogger logger)
        {
            // CRON expression syntax: <second> <minute> <hour> <day-of-month> <month> <day-of-week> <year> <command>

            AppInsightsLogger appInsightsLogger = new AppInsightsLogger(logger, LOGGING_SERVICE_NAME, LOGGING_SERVICE_VERSION);
            QueueLogger       queueLogger       = new QueueLogger(appInsightsLogger);

            queueLogger.LogQueueLength(BACKEND_STATUS_COMPLETED_PATTERN);
            queueLogger.LogQueueLength(BACKEND_STATUS_RUNNING_PATTERN);
            queueLogger.LogQueueLength(BACKEND_STATUS_FAILED_PATTERN);
        }