mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 23:06:36 +08:00
feat(core): implement app profile lifecycle dispatcher and wire cli commands
This commit is contained in:
@@ -88,13 +88,15 @@ func (p *Plugin) Apply(ctx *core.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
const defaultUserTaskRetry = 3
|
||||
|
||||
// 4. Register Asynq background tasks
|
||||
ctx.Task().Register("user:send_email_code", func(c context.Context, t *asynq.Task) error {
|
||||
ctx.Task().Register("user:send_email_code", func(_ context.Context, _ *asynq.Task) error {
|
||||
// Asynq background task handler
|
||||
return nil
|
||||
}, extpoints.WithTaskRetry(3))
|
||||
}, extpoints.WithTaskRetry(defaultUserTaskRetry))
|
||||
|
||||
ctx.Task().Register("user:cleanup_inactive", func(c context.Context, t *asynq.Task) error {
|
||||
ctx.Task().Register("user:cleanup_inactive", func(_ context.Context, _ *asynq.Task) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user