<commit_before>package com.rhcloud.igorbotian.rsskit.freake;

import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.rome.feed.synd.SyndFeed;
import com.rometools.rome.io.FeedException;
import com.rometools.rome.io.SyndFeedInput;
import com.rometools.rome.io.XmlReader;
import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.*;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @author <NAME> <<EMAIL>>
 */
public class FreakeRssFeed {

    private static final int NUMBER_OF_TOP_RELEASES = 7; // 7 top releases are shown on the main page

    private final Freake freake;
    private final Feed dayFeed;
    private final Feed topReleasesFeed;

    public FreakeRssFeed(Freake freake) throws IOException {
        this.freake = freake;

        dayFeed = new Feed(downloadFeed());
        topReleasesFeed = new Feed(downloadFeed());
        composeTopReleasesOfTheDay();

        TaskScheduler scheduler = new TaskScheduler();
        scheduler.executeEveryNMinutes(1, new Runnable() {

            @Override
            public void run() {
                try {
                    update();
                } catch (IOException e) {
                    e.printStackTrace(); // TODO
                }
            }
        });

        scheduler.executeEveryDayAt(22, new Runnable() {

            @Override
            public void run() {
                try {
                    composeTopReleasesOfTheDay();
                } catch (IOException e) {
                    e.printStackTrace(); // TODO
                }
            }<commit_msg>Update interval set to 30 mins<commit_after>package com.rhcloud.igorbotian.rsskit.freake;

import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.rome.feed.synd.SyndFeed;
import com.rometools.rome.io.FeedException;
import com.rometools.rome.io.SyndFeedInput;
import com.rometools.rome.io.XmlReader;
import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.*;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @author <NAME> <<EMAIL>>
 */
public class FreakeRssFeed {

    private static final int NUMBER_OF_TOP_RELEASES = 7; // 7 top releases are shown on the main page

    private final Freake freake;
    private final Feed dayFeed;
    private final Feed topReleasesFeed;

    public FreakeRssFeed(Freake freake) throws IOException {
        this.freake = freake;

        dayFeed = new Feed(downloadFeed());
        topReleasesFeed = new Feed(downloadFeed());
        composeTopReleasesOfTheDay();

        TaskScheduler scheduler = new TaskScheduler();
        scheduler.executeEveryNMinutes(30, new Runnable() {

            @Override
            public void run() {
                try {
                    update();
                } catch (IOException e) {
                    e.printStackTrace(); // TODO
                }
            }
        });

        scheduler.executeEveryDayAt(22, new Runnable() {

            @Override
            public void run() {
                try {
                    composeTopReleasesOfTheDay();
                } catch (IOException e) {
                    e.printStackTrace(); // TODO
                }
            }
{'fraction_non_alphanumeric': 0.09496236247828604, 'fraction_numerical': 0.0037637521713954833, 'mean_word_length': 2.2050092764378477, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2016165', 'n_tokens_mistral': 1018, 'n_tokens_neox': 956, 'n_words': 215}