public static T.Task AddJobsEventAsync(this CloudUtilities u, Job job, string message, EventType type = EventType.Information, CancellationToken token = default(CancellationToken), ILogger logger = null) =>
 u.AddJobsEventAsync(job.Type, job.Id, message, type, token, logger);
 public static T.Task AddJobsEventAsync(this CloudUtilities u, JobType jobType, int jobId, string message, EventType type = EventType.Information, CancellationToken token = default(CancellationToken), ILogger logger = null) =>
 u.AddJobsEventAsync(jobType, jobId, new Event()
 {
     Content = message, Source = EventSource.Job, Type = type
 }, token, logger);
 public static async T.Task FailJobWithEventAsync(this CloudUtilities u, JobType jobType, int jobId, string message, CancellationToken token, ILogger logger = null)
 {
     await T.Task.WhenAll(
         u.AddJobsEventAsync(jobType, jobId, message, EventType.Alert, token, logger),
         u.UpdateJobAsync(jobType, jobId, j => j.State = JobState.Failed, token, logger));
 }