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