🚧 合并冲突

pull/22/head
Xuanye Wong 5 years ago
commit cc8f7d218f
  1. 2
      build/releasenotes.props
  2. 2
      build/version.props
  3. 3
      samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj
  4. 4
      samples/ASPNetCoreExecutor/Extensions/XxlJobExecutorMiddleware.cs
  5. 9
      samples/ASPNetCoreExecutor/Startup.cs
  6. 6
      src/DotXxlJob.Core/XxlRestfulServiceHandler.cs

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<DotXxlJobPackageNotes>
1. 修正TriggerParam类中logId的类型和admin 不一致的问题
1. 修改异步方式读取RequestBody
</DotXxlJobPackageNotes>
</PropertyGroup>
</Project>

@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<DotXxlJobPackageVersion>2.0.1</DotXxlJobPackageVersion>
<DotXxlJobPackageVersion>2.0.2</DotXxlJobPackageVersion>
</PropertyGroup>
</Project>

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.Logging.Console">
<Version>2.2.0</Version>
</PackageReference>

@ -30,9 +30,9 @@ namespace ASPNetCoreExecutor
&& !string.IsNullOrEmpty(contentType)
&& contentType.ToLower().StartsWith("application/json"))
{
await _rpcService.HandlerAsync(context.Request,context.Response);
return;
}

@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Server.Kestrel.Core;
namespace ASPNetCoreExecutor
{
@ -27,12 +28,16 @@ namespace ASPNetCoreExecutor
services.AddSingleton<IJobHandler, DemoJobHandler>(); // 添加自定义的jobHandler
services.AddAutoRegistry(); // 自动注册
//services.Configure<KestrelServerOptions>(x => x.AllowSynchronousIO = true)
// .Configure<IISServerOptions>(x=> x.AllowSynchronousIO = true);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app,IHostingEnvironment env)
public void Configure(IApplicationBuilder app,IWebHostEnvironment env)
{
if (env.IsDevelopment())
if (env.EnvironmentName !="Production")
{
app.UseDeveloperExceptionPage();
}

@ -65,7 +65,7 @@ namespace DotXxlJob.Core
}
try
{
string json = CollectBody(request.Body);
string json = await CollectBody(request.Body);
switch (method)
{
case "beat":
@ -99,12 +99,12 @@ namespace DotXxlJob.Core
response.ContentType = "application/json;charset=utf-8";
await response.WriteAsync(JsonConvert.SerializeObject(ret));
}
private string CollectBody(Stream body)
private async Task<string> CollectBody(Stream body)
{
string bodyText;
using (var reader = new StreamReader(body))
{
bodyText = reader.ReadToEnd();
bodyText = await reader.ReadToEndAsync();
}
return bodyText;
}

Loading…
Cancel
Save