old_flsystem/应用/MessageSupervises/MessInfoClearThread.cs

30 lines
829 B
C#
Raw Permalink Normal View History

2022-09-20 03:10:29 +00:00
using Api.Framework;
using Api.Framework.SDK;
using Easy4net.Common;
using Easy4net.Context;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MessageSupervises
{
class MessInfoClearThread : TimerTask
{
public override void Run(object state, bool timedOut)
{
try
{
var session = ApiClient.GetSession();
session.ExcuteSQL("delete from fl_plugin_messagesupervises_messinfo where send_time < @time",new { time = DateTime.Now.AddSeconds(-(Class1.Config.FrequencyIntervalSecs + 1)) });
}
catch (Exception ex)
{
EventClient.OnEvent(this, $"朋友圈工具:{ex.Message}");
}
}
}
}