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