debugging workflow_execution + search invest
This commit is contained in:
parent
3e72510d53
commit
dc30412f2e
@ -246,7 +246,7 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string)
|
||||
targetDBCollection := CollectionMap[collection_name]
|
||||
list := []bson.M{}
|
||||
for _, k := range filter {
|
||||
list = append(list, bson.M{k: bson.M{"$regex": search, "$options": 'i'}})
|
||||
list = append(list, bson.M{k: bson.M{"$regex": search, "$options": "i"}})
|
||||
}
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
@ -254,8 +254,8 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string)
|
||||
if cursor, err := targetDBCollection.Find(
|
||||
MngoCtx,
|
||||
bson.M{"$or": []bson.M{
|
||||
{"name": bson.M{"$regex": search, "$options": 'i'}},
|
||||
{"description": bson.M{"$regex": search, "$options": 'i'}},
|
||||
{"name": bson.M{"$regex": search, "$options": "i"}},
|
||||
{"description": bson.M{"$regex": search, "$options": "i"}},
|
||||
}},
|
||||
opts,
|
||||
); err != nil {
|
||||
|
@ -59,7 +59,7 @@ func (d *WorkflowExecution) GetName() string {
|
||||
|
||||
func (d *WorkflowExecution) GetAccessor() utils.Accessor {
|
||||
data := &WorkflowExecutionMongoAccessor{}
|
||||
data.SetLogger(utils.WORKFLOW)
|
||||
data.SetLogger(utils.WORKFLOW_EXECUTION)
|
||||
return data
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user