small logging fix
This commit is contained in:
parent
7152549c99
commit
efbd541381
|
@ -184,19 +184,19 @@ func jsongetmap(j interface{}, key string) (map[string]interface{}, bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func savedonk(url string, name, media string) *Donk {
|
func savedonk(url string, name, media string) *Donk {
|
||||||
log.Printf("saving donk: %s", url)
|
|
||||||
var donk Donk
|
var donk Donk
|
||||||
row := stmtFindFile.QueryRow(url)
|
row := stmtFindFile.QueryRow(url)
|
||||||
err := row.Scan(&donk.FileID)
|
err := row.Scan(&donk.FileID)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return &donk
|
return &donk
|
||||||
}
|
}
|
||||||
|
log.Printf("saving donk: %s", url)
|
||||||
if err != nil && err != sql.ErrNoRows {
|
if err != nil && err != sql.ErrNoRows {
|
||||||
log.Printf("err querying: %s", err)
|
log.Printf("error querying: %s", err)
|
||||||
}
|
}
|
||||||
resp, err := http.Get(url)
|
resp, err := http.Get(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("errer fetching %s: %s", url, err)
|
log.Printf("error fetching %s: %s", url, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
Loading…
Reference in New Issue