fmt.Printf("Timeout : %d messages retrieved out of %d dating back %s (%d) ...\n",msgCount,msgParsed,lastParsedTime.Format(time.RFC3339),lastParsedID64)
log.Printf("getHistory(%d) : no handler for %s\n",msg.ID,msg.Content.GetMessageContentEnum())
}
ifm.ID64<lastParsedID64{
lastParsedID64=msg.ID
lastParsedTime=m.Date
}
ifmsgParsed%1000==0{
fmt.Printf("Waiting : %d messages retrieved out of %d dating back %s (%d) ...\n",msgCount,msgParsed,lastParsedTime.Format(time.RFC3339),lastParsedID64)
}
}
}else{
lastParsedID64=-1
}
ifprevLastParsedID64==lastParsedID64{
loopOverflow++
ifloopOverflow==5{
// we should be at the end !
lastParsedID64=-1
}else{
logOnError(err,"Overflow ...")
fmt.Printf("Overflow : %d messages retrieved out of %d dating back %s (%d) ...\n",msgCount,msgParsed,lastParsedTime.Format(time.RFC3339),lastParsedID64)