Increment exported vars for every language in a post
This commit is contained in:
parent
297e9e0347
commit
0f191b2609
1 changed files with 2 additions and 4 deletions
|
@ -320,11 +320,9 @@ func (c *Consumer) processMessage(ctx context.Context, typ string, r io.Reader,
|
||||||
}
|
}
|
||||||
langs, _, err := repo.GetLang(ctx, v)
|
langs, _, err := repo.GetLang(ctx, v)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
lang := ""
|
for _, lang := range langs {
|
||||||
if len(langs) != 0 {
|
postsByLanguageIndexed.WithLabelValues(c.remote.Host, lang).Inc()
|
||||||
lang = langs[0]
|
|
||||||
}
|
}
|
||||||
postsByLanguageIndexed.WithLabelValues(c.remote.Host, lang).Inc()
|
|
||||||
}
|
}
|
||||||
recs = append(recs, repo.Record{
|
recs = append(recs, repo.Record{
|
||||||
Repo: models.ID(repoInfo.ID),
|
Repo: models.ID(repoInfo.ID),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue