|
|
@ -7,9 +7,11 @@ using System.Net; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Cronos; |
|
|
|
using Microsoft.AspNetCore.SignalR; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using SettleAccount.Job.SignalR; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
|
|
|
|
|
@ -86,6 +88,7 @@ public class JobHostdService : BackgroundService, IApplicationService |
|
|
|
if (!jobItem.IsRunning) |
|
|
|
{ |
|
|
|
jobLogId = this.JobItemStart(job.Id); |
|
|
|
scope.ServiceProvider.GetRequiredService<IHubContext<PageHub>>().Clients.All.ServerToClient("JobItem", "refresh", ""); |
|
|
|
if (jobLogId.HasValue) |
|
|
|
{ |
|
|
|
try |
|
|
@ -100,6 +103,7 @@ public class JobHostdService : BackgroundService, IApplicationService |
|
|
|
Console.WriteLine(ex.ToString()); |
|
|
|
this.JobItemFaild(job.Id, jobLogId.Value, ex); |
|
|
|
} |
|
|
|
scope.ServiceProvider.GetRequiredService<IHubContext<PageHub>>().Clients.All.ServerToClient("JobItem", "refresh", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|