🌶 refactor(Job): 应该按任务标识删除旧任务,不能清空表
This commit is contained in:
parent
c8d55084d7
commit
842aa07d35
@ -380,12 +380,13 @@ public static class SqlSugarSetup
|
|||||||
// 初始化文本简称表数据
|
// 初始化文本简称表数据
|
||||||
if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId) dbProvider.InitTextAbbData();
|
if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId) dbProvider.InitTextAbbData();
|
||||||
|
|
||||||
// 由于修改定时任务后数据库无法更新,先清空定时任务数据
|
#region 由于修改定时任务后数据库无法更新,先清空定时任务数据,用于临时过渡,后期将删除
|
||||||
if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId)
|
if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId)
|
||||||
{
|
{
|
||||||
dbProvider.DbMaintenance.TruncateTable<SysJobDetail>();
|
dbProvider.Deleteable<SysJobDetail>().Where(u => u.JobId == "job_log").ExecuteCommandAsync();
|
||||||
dbProvider.DbMaintenance.TruncateTable<SysJobTrigger>();
|
dbProvider.Deleteable<SysJobTrigger>().Where(u => u.TriggerId == "trigger_log").ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
#endregion 由于修改定时任务后数据库无法更新,先清空定时任务数据,用于临时过渡,后期将删除
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user