mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
模块化定时任务,方便在插件中注册任务;增加日志分组
This commit is contained in:
@@ -29,6 +29,13 @@ func RegisterNotifyCall(group string, f NotifyCallFunc) {
|
||||
notifyCall[group] = f
|
||||
}
|
||||
|
||||
// RegisterNotifyCallMap 注册支付成功回调方法
|
||||
func RegisterNotifyCallMap(calls map[string]NotifyCallFunc) {
|
||||
for group, f := range calls {
|
||||
RegisterNotifyCall(group, f)
|
||||
}
|
||||
}
|
||||
|
||||
// NotifyCall 执行订单分组的异步回调
|
||||
func NotifyCall(ctx context.Context, in payin.NotifyCallFuncInp) {
|
||||
f, ok := notifyCall[in.Pay.OrderGroup]
|
||||
|
||||
Reference in New Issue
Block a user