소스 검색

Refactoring

master
Savorboard 6 년 전
부모
커밋
77a0ba3009
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      src/DotNetCore.CAP/ISubscribeExecutor.Default.cs
  2. +0
    -1
      src/DotNetCore.CAP/Infrastructure/Helper.cs
  3. +2
    -1
      src/DotNetCore.CAP/Infrastructure/SnowflakeId.cs

+ 1
- 1
src/DotNetCore.CAP/ISubscribeExecutor.Default.cs 파일 보기

@@ -164,7 +164,7 @@ namespace DotNetCore.CAP
if (!_selector.TryGetTopicExector(receivedMessage.Name, receivedMessage.Group,
out var executor))
{
var error = $"message can not be found subscriber, Message:{receivedMessage},\r\n see: https://github.com/dotnetcore/CAP/issues/63";
var error = $"Message can not be found subscriber. {receivedMessage} \r\n see: https://github.com/dotnetcore/CAP/issues/63";
throw new SubscriberNotFoundException(error);
}



+ 0
- 1
src/DotNetCore.CAP/Infrastructure/Helper.cs 파일 보기

@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using DotNetCore.CAP.Diagnostics;
using Newtonsoft.Json;


+ 2
- 1
src/DotNetCore.CAP/Infrastructure/SnowflakeId.cs 파일 보기

@@ -2,6 +2,7 @@
// An object that generates IDs. This is broken into a separate class in case we ever want to support multiple worker threads per process

using System;
using System.Threading;

namespace DotNetCore.CAP.Infrastructure
{
@@ -49,7 +50,7 @@ namespace DotNetCore.CAP.Infrastructure
{
lock (s_lock)
{
return _snowflakeId ?? (_snowflakeId = new SnowflakeId(AppDomain.CurrentDomain.Id, datacenterId));
return _snowflakeId ?? (_snowflakeId = new SnowflakeId(Thread.CurrentThread.ManagedThreadId, datacenterId));
}
}



불러오는 중...
취소
저장