定时任务

booking_auth_dev
wet 2 years ago
parent 9feef13592
commit 5fb5b518fb

@ -261,7 +261,7 @@ public class LogJobWorker : ISpareTimeWorker, IDynamicApiController, ITransient
/// </summary>
[SpareTime(120000, "TemporaryDocuments", Description = "后台批量删除临时文件,配置项参数:{\"quantity\": 2}不填默认为2",
DoOnce = false, StartNow = true, ExecuteType = SpareTimeExecuteTypes.Serial)]
public void TemporaryDocuments()
public void TemporaryDocuments(SpareTimer timer, long count)
{
var opt = App.GetOptions<TempFileOptions>();
var dirAbs = opt.Path;

@ -5231,7 +5231,7 @@
<param name="expression"></param>
<typeparam name="T"></typeparam>
</member>
<member name="M:Myshipping.Core.Job.LogJobWorker.TemporaryDocuments">
<member name="M:Myshipping.Core.Job.LogJobWorker.TemporaryDocuments(Furion.TaskScheduler.SpareTimer,System.Int64)">
<summary>
后台批量删除临时文件
</summary>

@ -297,7 +297,7 @@ public class SysTimerService : ISysTimerService, IDynamicApiController, IScoped
if (taskMethods != null) return taskMethods;
// 获取所有本地任务方法必须有spareTimeAttribute特性
taskMethods = App.EffectiveTypes
taskMethods = App.EffectiveTypes
.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(ISpareTimeWorker).IsAssignableFrom(u))
.SelectMany(u => u.GetMethods(BindingFlags.Public | BindingFlags.Instance)
.Where(m => m.IsDefined(typeof(SpareTimeAttribute), false) &&

Loading…
Cancel
Save