Skip to content

Commit

Permalink
调整定时作业分布式锁Key名称规则
Browse files Browse the repository at this point in the history
  • Loading branch information
猿人易 committed May 6, 2024
1 parent 8f46b2c commit 12c4810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NewLife.CubeNC/Services/JobService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void Stop()
private Boolean CheckRunning(CronJob job)
{
// 检查分布式锁,避免多节点重复执行
var key = $"{SysConfig.Current.Name}:Job:{job.Id}";
var key = $"Job:{SysConfig.Current.Name}:{job.Id}";
if (CacheProvider != null && !CacheProvider.Cache.Add(key, job.Name, 5)) return false;

// 有时候可能并没有配置Redis,借助数据库事务实现去重,需要20230804版本的XCode
Expand Down

0 comments on commit 12c4810

Please sign in to comment.