Improved avatars background job

This commit is contained in:
2017-07-18 03:55:47 +02:00
parent 1923a1a889
commit 1706ef9bc4
12 changed files with 56 additions and 351 deletions

23
bots/avatars/avatars.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"flag"
"log"
"net/http"
)
func refreshAvatar(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("ok"))
}
var port = "8001"
func init() {
flag.StringVar(&port, "port", "", "Port the HTTP server should listen on")
flag.Parse()
}
func main() {
http.HandleFunc("/", refreshAvatar)
log.Fatal(http.ListenAndServe(":"+port, nil))
}