code: func (b *Backend) connect() error {
  	client, err := b.dial()
  	if err != nil {
  		return err
  	}
  	b.client = client
  
  	database := "machinery"
  
  	if b.GetConfig().MongoDB != nil {
  		database = b.GetConfig().MongoDB.Database
  	}
  
  	b.tasksCollection = b.client.Database(database).Collection("tasks")
  	b.groupMetasCollection = b.client.Database(database).Collection("group_metas")
  
  	err = b.createMongoIndexes(database)
  	if err != nil {
  		return err
  	}
  	return nil
  }
docs: // connect creates the underlying mgo connection if it doesn't exist
  // creates required indexes for our collections