Skip to content

Commit

Permalink
延迟消息,基于未来时间生成雪花 Id 时会重复,去掉。
Browse files Browse the repository at this point in the history
  • Loading branch information
Soar360 committed Sep 2, 2024
1 parent 579a2bc commit 6e79880
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions AntJob.Server/Services/JobService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,8 @@ public Int32 Produce(App app, ProduceModel model)

jm.CreateTime = jm.UpdateTime = now;

// 雪花Id直接指定消息在未来的消费时间
if (model.DelayTime > 0)
{
jm.Id = snow.NewId(dTime);
jm.UpdateTime = dTime;
}

Expand Down

0 comments on commit 6e79880

Please sign in to comment.