mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
fix: disqus thread not store
This commit is contained in:
@@ -288,14 +288,14 @@ func handleAPIPostCreate(c *gin.Context) {
|
|||||||
cid = article.ID
|
cid = article.ID
|
||||||
|
|
||||||
if !article.IsDraft {
|
if !article.IsDraft {
|
||||||
|
// disqus
|
||||||
|
internal.ThreadCreate(article, cache.Ei.Blogger.BTitle)
|
||||||
// 异步执行,快
|
// 异步执行,快
|
||||||
go func() {
|
go func() {
|
||||||
// elastic
|
// elastic
|
||||||
internal.ElasticAddIndex(article)
|
internal.ElasticAddIndex(article)
|
||||||
// rss
|
// rss
|
||||||
internal.PingFunc(cache.Ei.Blogger.BTitle, slug)
|
internal.PingFunc(cache.Ei.Blogger.BTitle, slug)
|
||||||
// disqus
|
|
||||||
internal.ThreadCreate(article, cache.Ei.Blogger.BTitle)
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -327,16 +327,16 @@ func handleAPIPostCreate(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
if !article.IsDraft {
|
if !article.IsDraft {
|
||||||
cache.Ei.RepArticle(artc, article)
|
cache.Ei.RepArticle(artc, article)
|
||||||
|
// disqus
|
||||||
|
if artc == nil {
|
||||||
|
internal.ThreadCreate(article, cache.Ei.Blogger.BTitle)
|
||||||
|
}
|
||||||
// 异步执行,快
|
// 异步执行,快
|
||||||
go func() {
|
go func() {
|
||||||
// elastic
|
// elastic
|
||||||
internal.ElasticAddIndex(article)
|
internal.ElasticAddIndex(article)
|
||||||
// rss
|
// rss
|
||||||
internal.PingFunc(cache.Ei.Blogger.BTitle, slug)
|
internal.PingFunc(cache.Ei.Blogger.BTitle, slug)
|
||||||
// disqus
|
|
||||||
if artc == nil {
|
|
||||||
internal.ThreadCreate(article, cache.Ei.Blogger.BTitle)
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user