Example #1
0
func (top *Topology) GetActionWithSeq(seq int64) (*models.Action, error) {
	var err error
	var act *models.Action
	for {
		act, err = models.GetActionWithSeq(top.zkConn, top.ProductName, seq, top.provider)
		if err == nil || top.IsFatalErr(err) {
			break
		} else {
			time.Sleep(ZK_RECONNECT_INTERVAL * time.Second)
		}
		if err != nil {
			log.ErrorErrorf(err, " GetActionWithSeq ")
			act = nil
		}
	}
	return act, err
}
Example #2
0
func (top *Topology) GetActionWithSeq(seq int64) (*models.Action, error) {
	return models.GetActionWithSeq(top.zkConn, top.ProductName, seq, top.provider)
}