queue system settings expanded. Update debug to goffee log system
This commit is contained in:
parent
fc57baff78
commit
f4476d3e89
5 changed files with 74 additions and 4 deletions
|
|
@ -3,8 +3,9 @@ package workers
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"fmt"
|
||||
|
||||
"git.smarteching.com/goffee/core/logger"
|
||||
"github.com/hibiken/asynq"
|
||||
)
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ func HandleWelcomeEmailTask(ctx context.Context, t *asynq.Task) error {
|
|||
if err := json.Unmarshal(t.Payload(), &p); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf(" [*] Send Welcome Email to User %d", p.UserID)
|
||||
logger.ResolveLogger().Info(fmt.Sprintf(" [*] Send Welcome Email to User %d", p.UserID))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +35,6 @@ func HandleReminderEmailTask(ctx context.Context, t *asynq.Task) error {
|
|||
if err := json.Unmarshal(t.Payload(), &p); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf(" [*] Send Reminder Email to User %d", p.UserID)
|
||||
logger.ResolveLogger().Info(fmt.Sprintf(" [*] Send Reminder Email to User %d", p.UserID))
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue