From 5d7a083f4a1cba08de9b9367b033afe5172b3f39 Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Fri, 30 Jan 2026 22:37:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/Service/CStoreSCPService.cs | 26 +++++++++++++++--------- irc_api.drone.yml | 19 ++++------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/IRC.Core.SCP/Service/CStoreSCPService.cs b/IRC.Core.SCP/Service/CStoreSCPService.cs index 4ffb31d38..820e5c7f8 100644 --- a/IRC.Core.SCP/Service/CStoreSCPService.cs +++ b/IRC.Core.SCP/Service/CStoreSCPService.cs @@ -205,19 +205,25 @@ namespace IRaCIS.Core.SCP.Service var _SCPImageUploadRepository = _serviceProvider.GetService>(); - _upload.EndTime = DateTime.Now; - _upload.StudyCount = _ImageUploadList.Count; - _upload.TrialId = _trialId; - _upload.TrialSiteId = _trialSiteId; - - _upload.UploadJsonStr = (new SCPImageLog() { UploadList = _ImageUploadList }).ToJsonStr(); - - //可能是测试echo 导致记录了 - if (_upload.FileCount > 0) + //有时候没有建立连接会走关闭通过日志发现 + if (_upload != null) { + _upload.EndTime = DateTime.Now; + _upload.StudyCount = _ImageUploadList.Count; + _upload.TrialId = _trialId; + _upload.TrialSiteId = _trialSiteId; + + _upload.UploadJsonStr = (new SCPImageLog() { UploadList = _ImageUploadList }).ToJsonStr(); + //可能是测试echo 导致记录了 - await _SCPImageUploadRepository.AddAsync(_upload, true); + if (_upload.FileCount > 0) + { + //可能是测试echo 导致记录了 + await _SCPImageUploadRepository.AddAsync(_upload, true); + } } + + } diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 3532380ce..785ee716c 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -18,8 +18,7 @@ server: steps: - name: build-uat-irc commands: - - cd /opt/1panel/xc-deploy/Uat_IRC/devops-build-publish/Uat-To-Uat - - sh uat-branch-latest-build-image-publish.sh v${DRONE_BUILD_NUMBER} + - bash /opt/1panel/xc-deploy-new/Uat_IRC/devops-publish/uat-branch-publish.sh trigger: branch: @@ -46,12 +45,7 @@ server: steps: - name: publish-test-irc commands: - - cd /opt/1panel/xc-deploy/Test_IRC/devops-build-publish;sh test-irc-update-or-create-stack.sh v${DRONE_BUILD_NUMBER} - -- name: publish-test-irc-scp - commands: - - cd /opt/1panel/xc-deploy/Test_IRC_SCP/devops-build-publish;sh pull-build-test-irc-scp-image.sh v${DRONE_BUILD_NUMBER} - - cd /opt/1panel/xc-deploy/Test_IRC_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} + - bash /opt/1panel/xc-deploy-new/Test_IRC_Swarm/devops-publish/test-branch-publish.sh trigger: branch: @@ -108,13 +102,8 @@ server: steps: - name: publish-test-hir commands: - - cd /opt/1panel/xc-deploy/Test_HIR/devops-build-publish;sh pull-build-test-hir-image.sh v${DRONE_BUILD_NUMBER} - - cd /opt/1panel/xc-deploy/Test_HIR ; sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} - -- name: publish-test-hir-scp - commands: - - cd /opt/1panel/xc-deploy/Test_HIR_SCP/devops-build-publish;sh pull-build-test-hir-scp-image.sh v${DRONE_BUILD_NUMBER} - - cd /opt/1panel/xc-deploy/Test_HIR_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} + - bash /opt/1panel/xc-deploy-new/Test_HIR/devops-publish/test-branch-publish.sh + trigger: branch: - Test_HIR