mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-06 16:36:53 +08:00
feat: implement Validate
to check for cycle
This commit is contained in:
@@ -3,6 +3,7 @@ package tasks
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/oarkflow/errors"
|
||||
"github.com/oarkflow/json"
|
||||
|
||||
"github.com/oarkflow/mq"
|
||||
@@ -35,6 +36,7 @@ func (e *Condition) ProcessTask(ctx context.Context, task *mq.Task) mq.Result {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return mq.Result{Error: errors.New("Condition error")}
|
||||
switch email := data["email"].(type) {
|
||||
case string:
|
||||
if email == "abc.xyz@gmail.com" {
|
||||
|
Reference in New Issue
Block a user