|
|
@@ -70,7 +70,7 @@ func GetAutomaticReply(msg string) *AutomaticResponseContent { |
|
|
|
} |
|
|
|
|
|
|
|
func loadAutomaticReplyFromDisk() ([]*AutomaticResponseContent, error) { |
|
|
|
log.Debug("LoadAutomaticResponseMap from disk") |
|
|
|
log.Info("LoadAutomaticResponseMap from disk") |
|
|
|
repo, err := models.GetRepositoryByOwnerAndAlias(setting.UserNameOfAutoReply, setting.RepoNameOfAutoReply) |
|
|
|
if err != nil { |
|
|
|
log.Error("get AutomaticReply repo failed, error=%v", err) |
|
|
@@ -92,7 +92,7 @@ func loadAutomaticReplyFromDisk() ([]*AutomaticResponseContent, error) { |
|
|
|
func LoadAutomaticReplyFromCacheAndDisk() ([]*AutomaticResponseContent, error) { |
|
|
|
v, success := WechatReplyCache.Get(WECHAT_REPLY_CACHE_KEY) |
|
|
|
if success { |
|
|
|
log.Debug("LoadAutomaticResponse from cache,value = %v", v) |
|
|
|
log.Info("LoadAutomaticResponse from cache,value = %v", v) |
|
|
|
if v == nil { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|