Skip to content

Commit 6babe89

Browse files
committed
✨ B3 同步
1 parent babd70d commit 6babe89

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎cron/pushcron.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ func pushArticles() {
7373
result := &map[string]interface{}{}
7474
gorequest.New().Post("https://rhythm.b3log.org/api/article").SendMap(requestJSON).
7575
Set("user-agent", util.UserAgent).Timeout(30 * time.Second).EndStruct(result)
76+
logger.Tracef("%+v", result)
7677

7778
article.PushedAt = article.UpdatedAt
78-
service.Article.UpdateArticle(article)
79+
service.Article.UpdatePushedAt(article)
7980
}
8081
}
8182

@@ -125,8 +126,9 @@ func pushComments() {
125126
result := &map[string]interface{}{}
126127
gorequest.New().Post("https://rhythm.b3log.org/api/comment").SendMap(requestJSON).
127128
Set("user-agent", util.UserAgent).Timeout(30 * time.Second).EndStruct(result)
129+
logger.Tracef("%+v", result)
128130

129131
comment.PushedAt = comment.UpdatedAt
130-
service.Comment.UpdateComment(comment)
132+
service.Comment.UpdatePushedAt(comment)
131133
}
132134
}

0 commit comments

Comments
 (0)