+func (rh *Resthook) getPolicyInstanceStatus(policyTypeId models.PolicyTypeID, policyInstanceID models.PolicyInstanceID) (bool, error) {
+ instancehandlerKey := a1HandlerPrefix + strconv.FormatInt((int64(policyTypeId)), 10) + "." + string(policyInstanceID)
+ var keys [1]string
+ keys[0] = instancehandlerKey
+ resp, err := rh.db.Get(a1MediatorNs, keys[:])
+ if err != nil {
+ a1.Logger.Error("error1 :%+v", err)
+ return false, err
+ }
+ for _, key := range resp {
+ if key == "OK" {
+ return true, nil
+ }
+ }
+ return false, nil
+}
+