feat(all): v1.0

This commit is contained in:
2024-11-21 12:14:34 +08:00
parent d09e7a08cf
commit 6ce1a303f1
61 changed files with 3106 additions and 1046 deletions

View File

@@ -0,0 +1,28 @@
package queue
import (
"context"
"github.com/hibiken/asynq"
"qnc-server/app/user/cmd/api/internal/svc"
"qnc-server/app/user/cmd/api/internal/types"
)
type CronJob struct {
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewCronJob(ctx context.Context, svcCtx *svc.ServiceContext) *CronJob {
return &CronJob{
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *CronJob) Register() *asynq.ServeMux {
mux := asynq.NewServeMux()
mux.Handle(types.MsgPaySuccessQuery, NewPaySuccessNotifyUserHandler(l.svcCtx))
return mux
}