zhufuyi / sponge

Sponge is a powerful Go development framework, it's easy to develop web, gRPC and microservice projects.
https://go-sponge.com
MIT License
1.48k stars 146 forks source link

sponge 里的cron 怎么解决重复执行的问题呢 #58

Closed lijianow closed 2 months ago

lijianow commented 2 months ago

比如1秒查询一次

每次查询1万条,那这1万条还没处理完 我看又会被调用,请问sponge框架支持什么配置可以解决这个问题吗

lijianow commented 2 months ago

我目前用的 var mutex sync.Mutex

mutex.Lock() defer mutex.Unlock()

zhufuyi commented 2 months ago
lijianow commented 2 months ago

谢谢了 好的 我去处理