From 77e894d6eb5ed77e2aef724268f1f2accabe7fd6 Mon Sep 17 00:00:00 2001 From: wangshaoming Date: Tue, 9 Apr 2019 09:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj | 6 ++++++ samples/ASPNetCoreExecutor/appsettings.json | 2 +- src/DotXxlJob.Core/ExecutorRegistry.cs | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj b/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj index 91cf196..0562725 100644 --- a/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj +++ b/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj @@ -19,4 +19,10 @@ <_ContentIncludedByDefault Remove="Properties\launchSettings.json" /> + + + PreserveNewest + + + diff --git a/samples/ASPNetCoreExecutor/appsettings.json b/samples/ASPNetCoreExecutor/appsettings.json index 7d418fb..b9ed814 100644 --- a/samples/ASPNetCoreExecutor/appsettings.json +++ b/samples/ASPNetCoreExecutor/appsettings.json @@ -9,7 +9,7 @@ "appName": "xxl-job-executor-dotnet", "specialBindAddress": "127.0.0.1", "port": 5000, - "autoRegistry":true, + "autoRegistry":false, "accessToken": "", "logRetentionDays": 30 } diff --git a/src/DotXxlJob.Core/ExecutorRegistry.cs b/src/DotXxlJob.Core/ExecutorRegistry.cs index 3c83335..7240d76 100644 --- a/src/DotXxlJob.Core/ExecutorRegistry.cs +++ b/src/DotXxlJob.Core/ExecutorRegistry.cs @@ -58,6 +58,7 @@ namespace DotXxlJob.Core catch (Exception ex) { errorTimes++; + await Task.Delay(Constants.RegistryInterval, cancellationToken); this._logger.LogError(ex,"registry error:{0},{1} Times",ex.Message,errorTimes); } }