test
This commit is contained in:
parent
82800b4a0a
commit
6da33a53e4
7
job.go
7
job.go
@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -548,12 +549,12 @@ func jobBackupImport(j Job) {
|
||||
rc, err := f.Open()
|
||||
logOnError(err, "jobBackupImport : Open")
|
||||
if err != nil {
|
||||
return err
|
||||
return
|
||||
}
|
||||
data, err := ioutil.ReadAll(rc)
|
||||
logOnError(err, "jobBackupImport : ReadAll")
|
||||
if err != nil {
|
||||
return err
|
||||
return
|
||||
}
|
||||
log.Printf("jobBackupImport : %d uncompressed bytes.\n", len(data))
|
||||
rc.Close()
|
||||
@ -561,7 +562,7 @@ func jobBackupImport(j Job) {
|
||||
err = json.Unmarshal(data, &bkp)
|
||||
logOnError(err, "jobBackupImport : Unmarshal")
|
||||
if err != nil {
|
||||
return err
|
||||
return
|
||||
}
|
||||
for _, m := range bkp.Messages {
|
||||
_, err = addObjMsg(m.ID64, m.ChatID64, m.UserID64, m.SenderUserID64, m.Date, m.Text)
|
||||
|
Loading…
Reference in New Issue
Block a user