示例#1
0
        private async Task <JobResult> ConfigureAndExecuteJob(IJob job)
        {
            try
            {
                Log.Logger = job.ConfigureLogger();

                return(await job.Execute());
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "Error running job");
                return(JobResult.Failure);
            }
        }