0RaymondJiang0

0RaymondJiang0

Member Since 11 years ago

Mars

Experience Points
49
follower
Lessons Completed
37
follow
Lessons Completed
846
stars
Best Reply Awards
59
repos

70 contributions in the last year

Pinned
⚡ ngrok space for business
⚡ Book price compare in China online book market.
⚡ A delay queue implemented in go language
⚡ Tech Forum Android Client
⚡ A telegram chat robot
⚡ stock trading strategy system
Activity
May
21
8 hours ago
May
20
1 day ago
push

0RaymondJiang0 push 0RaymondJiang0/go-delayqueue

0RaymondJiang0
0RaymondJiang0

Merge branch 'main' of github.com:0RaymondJiang0/go-delayqueue

commit sha: 59d93462b1011c4b2b7b7c045f2a21d891686933

push time in 20 hours ago
Apr
26
3 weeks ago
Apr
25
3 weeks ago
pull request

0RaymondJiang0 pull request TimothyYe/skm

0RaymondJiang0
0RaymondJiang0

Improve: Add partial match for use command

  • If the complete match does not work, then add a partial match logic when the 'use' command is used.
Activity icon
created branch

0RaymondJiang0 in 0RaymondJiang0/skm create branch add-partial-match-for-use-command

createdAt 3 weeks ago
Activity icon
fork

0RaymondJiang0 forked TimothyYe/skm

⚡ A simple and powerful SSH keys manager
0RaymondJiang0 MIT License Updated
fork time in 3 weeks ago
Apr
23
4 weeks ago
Apr
21
1 month ago
Mar
20
2 months ago
Mar
7
2 months ago
Activity icon
issue

0RaymondJiang0 issue comment 0RaymondJiang0/go-delayqueue

0RaymondJiang0
0RaymondJiang0

服务重启延迟队列重新计算

写的很好,但是我发现一个问题,服务停止一会然后重启,会从redis拿数据然后重新计算时间,中间的时间误差在代码中没有看到解决

0RaymondJiang0
0RaymondJiang0

是的,中间的时间,目前没有处理。如果要处理,估计需要记录时间到任务上面,而且需要一个中间件去统一多个服务上实例的时间,让他们保持一致。如果是单实例,就没有问题,直接用时间差额计算最新时间。最初这么设计,主要是考虑,如果某些通知任务,因为down机延期了,还是希望实现延期通知,而不要因为错过了时间就把它删除掉。

Activity icon
issue

0RaymondJiang0 issue comment 0RaymondJiang0/go-delayqueue

0RaymondJiang0
0RaymondJiang0

go-delayqueue

type wheel struct { // NotifyTasks []*Task //所有在时间轮上的任务均采用链表形式存储 //如果采用数组,对应已经执行过的任务,会造成不必要的空间浪费或者数组移动造成的时间复杂度 NotifyTasks *Task } 这个做不到无锁吧?如果不加锁的话,多起几个goroutine进行PUSH会有问题

0RaymondJiang0
0RaymondJiang0

这里没有竞争资源,不用加锁吧。多开go routine push这个就是真实场景的嘛,有什么问题呢?

Feb
22
2 months ago
started
started time in 2 months ago