<commit_before>package parse

import (
	"fmt"
	"strconv"
	"time"

	"github.com/looyun/feedall/controllers"
	"github.com/looyun/feedall/models"
	"github.com/mmcdole/gofeed"
	"gopkg.in/mgo.v2/bson"
)

func Parse() {
	for {
		timer := time.NewTimer(60 * time.Second)
		fmt.Println("start parse!")
		feeds := make([]*models.Feed, 0)
		err := models.FindAll(models.Feeds, nil, &feeds)
		if err != nil {
			fmt.Println(<-timer.C)
			continue
		} else {
			Finish := make(chan string)
			fb := gofeed.NewParser()
			for _, u := range feeds {
				go func(u *models.Feed) {
					origin_feed, err := fb.ParseURL(u.FeedLink)<commit_msg>Update parse interval time to 10min<commit_after>package parse

import (
	"fmt"
	"strconv"
	"time"

	"github.com/looyun/feedall/controllers"
	"github.com/looyun/feedall/models"
	"github.com/mmcdole/gofeed"
	"gopkg.in/mgo.v2/bson"
)

func Parse() {
	for {
		timer := time.NewTimer(600 * time.Second)
		fmt.Println("start parse!")
		feeds := make([]*models.Feed, 0)
		err := models.FindAll(models.Feeds, nil, &feeds)
		if err != nil {
			fmt.Println(<-timer.C)
			continue
		} else {
			Finish := make(chan string)
			fb := gofeed.NewParser()
			for _, u := range feeds {
				go func(u *models.Feed) {
					origin_feed, err := fb.ParseURL(u.FeedLink)
{'fraction_non_alphanumeric': 0.16496465043205027, 'fraction_numerical': 0.00864100549882168, 'mean_word_length': 3.4859154929577465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3985208', 'n_tokens_mistral': 576, 'n_tokens_neox': 509, 'n_words': 96}