debugging workflow_execution + search invest

This commit is contained in:
mr 2024-07-29 17:05:39 +02:00
parent 3e72510d53
commit dc30412f2e
2 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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
}