Beispiel #1
0
        // Please set the following connection strings in app.config for this WebJob to run:
        // AzureWebJobsDashboard and AzureWebJobsStorage
        static void Main()
        {
            try
            {
                // clears down the cache once started
                RedisCacheHelper helper = new RedisCacheHelper();
                helper.ClearDownRedisCache();

                Functions.SetupEventProcessorIoTHub().Wait();
                Functions.SetupEventProcessorDeviceMessages().Wait();

                RunAsync().Wait();
            }
            catch (Exception ex)
            {
                cancellationTokenSource.Cancel();
                Console.WriteLine("Webjob terminating: {0}", ex.ToString());
            }
        }