Skip to content
Snippets Groups Projects

Initial implementation of an elasticsearch indexer in Go

Merged Nick Thomas requested to merge 1-initial-implementation into master
All threads resolved!
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
+ 6
1
@@ -23,7 +23,6 @@ func main() {
if err != nil {
log.Fatalln("Failed to connect to elasticsearch:", err)
}
defer esClient.Close()
projectID := os.Args[1]
projectPath := os.Args[2]
@@ -40,4 +39,10 @@ func main() {
log.Printf("Project ID: %s, Rails env: %s", projectID, railsEnv)
repo.Index(esClient)
// Flushes any queued requests. Errors mean we've not indexed everything, so
// need to return an error code
if err := esClient.Close(); err != nil {
log.Fatalln("Elasticsearch error: ", err)
}
}
Loading