handle two more db error conditions
This commit is contained in:
parent
c91fd71e1e
commit
d6929a5644
|
@ -128,7 +128,11 @@ func redeliverator() {
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var d Doover
|
var d Doover
|
||||||
var dt string
|
var dt string
|
||||||
rows.Scan(&d.ID, &dt)
|
err := rows.Scan(&d.ID, &dt)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error scanning dooverid: %s", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
d.When, _ = time.Parse(dbtimeformat, dt)
|
d.When, _ = time.Parse(dbtimeformat, dt)
|
||||||
doovers = append(doovers, d)
|
doovers = append(doovers, d)
|
||||||
}
|
}
|
||||||
|
@ -141,7 +145,11 @@ func redeliverator() {
|
||||||
var username, rcpt string
|
var username, rcpt string
|
||||||
var msg []byte
|
var msg []byte
|
||||||
row := stmtLoadDoover.QueryRow(d.ID)
|
row := stmtLoadDoover.QueryRow(d.ID)
|
||||||
row.Scan(&goarounds, &username, &rcpt, &msg)
|
err := row.Scan(&goarounds, &username, &rcpt, &msg)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error scanning doover: %s", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
stmtZapDoover.Exec(d.ID)
|
stmtZapDoover.Exec(d.ID)
|
||||||
log.Printf("redeliverating %s try %d", rcpt, goarounds)
|
log.Printf("redeliverating %s try %d", rcpt, goarounds)
|
||||||
deliverate(goarounds, username, rcpt, msg)
|
deliverate(goarounds, username, rcpt, msg)
|
||||||
|
|
Loading…
Reference in New Issue