Compare commits
No commits in common. "8ac429efef917403f5936ad520a846df6876d4db" and "addec01dc82437b4161710740947289d5594f770" have entirely different histories.
8ac429efef
...
addec01dc8
@ -11,8 +11,6 @@ using JiShe.CollectBus.FreeSql;
|
||||
using System;
|
||||
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
|
||||
using JiShe.CollectBus.FreeRedisProvider;
|
||||
using JiShe.CollectBus.Workers;
|
||||
using Volo.Abp.BackgroundWorkers.Hangfire;
|
||||
|
||||
namespace JiShe.CollectBus;
|
||||
|
||||
@ -21,7 +19,7 @@ namespace JiShe.CollectBus;
|
||||
typeof(CollectBusApplicationContractsModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpAutoMapperModule),
|
||||
typeof(AbpBackgroundWorkersHangfireModule),
|
||||
typeof(AbpBackgroundWorkersModule),
|
||||
typeof(FreeRedisProviderModule),
|
||||
typeof(CollectBusFreeSqlModule)
|
||||
)]
|
||||
@ -42,7 +40,7 @@ public class CollectBusApplicationModule : AbpModule
|
||||
});
|
||||
}
|
||||
|
||||
public override void OnApplicationInitialization(
|
||||
public override async Task OnApplicationInitializationAsync(
|
||||
ApplicationInitializationContext context)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
@ -50,7 +48,7 @@ public class CollectBusApplicationModule : AbpModule
|
||||
|
||||
foreach (var type in types)
|
||||
{
|
||||
context.AddBackgroundWorkerAsync(type);
|
||||
await context.AddBackgroundWorkerAsync(type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Hangfire;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Volo.Abp.BackgroundWorkers.Hangfire;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Uow;
|
||||
|
||||
namespace JiShe.CollectBus.Workers
|
||||
{
|
||||
@ -19,18 +17,13 @@ namespace JiShe.CollectBus.Workers
|
||||
public EpiCollectWorker(ILogger<EpiCollectWorker> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
RecurringJobId = nameof(EpiCollectWorker);
|
||||
CronExpression = Cron.Daily();
|
||||
}
|
||||
|
||||
|
||||
public override Task DoWorkAsync(CancellationToken cancellationToken = new CancellationToken())
|
||||
{
|
||||
using (var uow = LazyServiceProvider.LazyGetRequiredService<IUnitOfWorkManager>().Begin())
|
||||
{
|
||||
Logger.LogInformation("Executed MyLogWorker..!");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
_logger.LogError("Executed MyLogWorker..!");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,11 +8,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Abstractions\**" />
|
||||
<Compile Remove="Interfaces\**" />
|
||||
<EmbeddedResource Remove="Abstractions\**" />
|
||||
<EmbeddedResource Remove="Interfaces\**" />
|
||||
<None Remove="Abstractions\**" />
|
||||
<None Remove="Interfaces\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -27,4 +24,8 @@
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.3.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Interfaces\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -20,10 +20,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Localization\CollectBus\*.json" />
|
||||
<Compile Remove="Caches\**" />
|
||||
<Content Remove="Localization\CollectBus\*.json" />
|
||||
<EmbeddedResource Remove="Caches\**" />
|
||||
<None Remove="Caches\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -31,4 +28,8 @@
|
||||
<None Remove="JiShe.CollectBus.Domain.Shared.abppkg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Caches\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace JiShe.CollectBus.Loggers
|
||||
{
|
||||
public static class LoggerExtensions
|
||||
{
|
||||
public static void LogInfoToMongo(
|
||||
this ILogger logger,
|
||||
EventId eventId,
|
||||
Exception? exception,
|
||||
string? message,
|
||||
params object?[] args)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void LogInfoToMongo(this ILogger logger)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static void Log(
|
||||
this ILogger logger,
|
||||
LogLevel logLevel,
|
||||
EventId eventId,
|
||||
string? message,
|
||||
params object?[] args)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,8 +26,4 @@
|
||||
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="8.3.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Loggers\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -39,7 +39,6 @@ namespace JiShe.CollectBus.Host
|
||||
public void Configure(IApplicationBuilder app, IHostApplicationLifetime lifetime)
|
||||
{
|
||||
app.InitializeApplication();
|
||||
//await app.InitializeApplicationAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user