1.朋友圈工具跟发逻辑优化
This commit is contained in:
parent
b7c634141e
commit
d23ad73d71
|
@ -76,6 +76,7 @@ namespace CircleFriendsTools
|
||||||
|
|
||||||
Config = this.ReadConfig<Config>();
|
Config = this.ReadConfig<Config>();
|
||||||
var thread = TimerTask.NewTimer<MonitorThread>(1) as MonitorThread; //创建线程 - 监听好友朋友圈和接口的线程 1秒
|
var thread = TimerTask.NewTimer<MonitorThread>(1) as MonitorThread; //创建线程 - 监听好友朋友圈和接口的线程 1秒
|
||||||
|
thread.Init();
|
||||||
thread.plugin = this;
|
thread.plugin = this;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -52,12 +52,11 @@ namespace CircleFriendsTools
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static BlockingCollection<WaitSendCircleInfo> waitSendCircleInfoList = new BlockingCollection<WaitSendCircleInfo>();
|
private static BlockingCollection<WaitSendCircleInfo> waitSendCircleInfoList = new BlockingCollection<WaitSendCircleInfo>();
|
||||||
|
|
||||||
|
public void Init()
|
||||||
static MonitorThread()
|
|
||||||
{
|
{
|
||||||
var th = new Thread(() =>
|
var th = new Thread(() =>
|
||||||
{
|
{
|
||||||
foreach (var circleInfo in waitSendCircleInfoList)
|
foreach (var circleInfo in waitSendCircleInfoList.GetConsumingEnumerable())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -364,6 +363,7 @@ namespace CircleFriendsTools
|
||||||
|
|
||||||
if (isNews)
|
if (isNews)
|
||||||
{
|
{
|
||||||
|
EventClient.OnEvent(this, $"朋友圈工具 - 采集到新朋友圈内容 等待发送数量 => {waitSendCircleInfoList.Count}");
|
||||||
if (!string.IsNullOrWhiteSpace(newestTime))
|
if (!string.IsNullOrWhiteSpace(newestTime))
|
||||||
{
|
{
|
||||||
Class1.Config.MonitorInfoHistoryTime = newestTime;
|
Class1.Config.MonitorInfoHistoryTime = newestTime;
|
||||||
|
|
|
@ -10,6 +10,7 @@ using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Api.Framework.Utils;
|
||||||
|
|
||||||
namespace Api.Framework.Tools
|
namespace Api.Framework.Tools
|
||||||
{
|
{
|
||||||
|
@ -724,7 +725,7 @@ namespace Api.Framework.Tools
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
EventClient.OnEvent("", $"增加字段异常:{ex.Message} - {tableName} - {columnName} - {sqlType}");
|
LogHelper.GetSingleObj().Error("启动表字段检测", $"增加字段异常:{ex.Message} - {tableName} - {columnName} - {sqlType}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue