Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.19 KB | None | 0 0
  1.        [FunctionName("GetTranscriptionToDoCount_Timer")]
  2.         public async static Task GetTranscriptionToDoCount_Timer(
  3.             [TimerTrigger("0 */1 * * * *")]TimerInfo myTimer,
  4.             [SignalR(HubName = "typeit")] IAsyncCollector<SignalRMessage> signalRMessages,
  5.             [Table(tableName, Connection = "AzureWebJobsStorage")] CloudTable TranscriptionTable,
  6.             ILogger log)
  7.  
  8.         {
  9.             log.LogInformation($"GetTranscriptionToDoCount_Timer trigger function executed at: {DateTime.Now}");
  10.             try
  11.             {
  12.  
  13.                 log.LogInformation("Getting Count Of Items");
  14.            
  15.                     var m = new msg();
  16.                     m.sender = "function";
  17.                     m.text = $"ToDo|{filteredList.Count}";
  18.                     object message = m;
  19.  
  20.                     await signalRMessages.AddAsync(new SignalRMessage
  21.                     {
  22.                         Target = "newMessage",
  23.                         Arguments = new[] { message }
  24.                     });
  25.            
  26.             }
  27.             catch (Exception ex)
  28.             {
  29.                 log.LogError(ex.Message);
  30.                 throw;
  31.             }
  32.  
  33.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement