Code Monkey home page Code Monkey logo

feed-feeder's Introduction

Feed Feeder

Checks RSS feeds for changes and saves new items to your database. Uses PubSubHubbub where possible otherwise polls every specified interval. This is used at Lateral to power the news recommendations of NewsBot.

Initializing

Run the setup script to install dependencies, create databases and all that jazz:

bin/setup

Running

The main components to the application are the rails server, resque and resque-scheduler. To start them all for development (after installing foreman gem install foreman) run:

foreman start

For production the services should each be started separately and kept alive through something like systemd. For example with:

Feed Feeder - /etc/systemd/system/ff.service

[Unit]
Description=Feed Feeder
After=multi-user.target

[Service]
User=ubuntu
WorkingDirectory={PROJECT_DIR}
ExecStart={PROJECT_DIR}/bin/puma --tag feed-feeder -e production -b tcp://0.0.0.0:9292
Restart=always

[Install]
WantedBy=multi-user.target

Resque - /etc/systemd/system/[email protected]

[Unit]
Description=Resque #%i
After=multi-user.target

[Service]
User=ubuntu
Environment=RAILS_ENV=production QUEUE=*
WorkingDirectory={PROJECT_DIR}
ExecStart={PROJECT_DIR}/bin/rake -f {PROJECT_DIR}/Rakefile environment resque:work
Restart=always
RuntimeMaxSec=28800

[Install]
WantedBy=multi-user.target

Resque Scheduler - /etc/systemd/system/ff-resque-scheduler.service

[Unit]
Description=Resque Schdeduler
After=multi-user.target

[Service]
User=ubuntu
Environment=RAILS_ENV=production
WorkingDirectory={PROJECT_DIR}
ExecStart={PROJECT_DIR}/bin/rake -f {PROJECT_DIR}/Rakefile environment resque:scheduler
Restart=always
RuntimeMaxSec=28800

[Install]
WantedBy=multi-user.target

And then running (untested):

sudo systemctl enable ff.service
sudo systemctl enable ff-resque@@{1..5}.service
sudo systemctl enable ff-resque-scheduler.service
sudo systemctl start ff.service
sudo systemctl start ff-resque@@{1..5}.service
sudo systemctl start ff-resque-scheduler.service

feed-feeder's People

Contributors

betamax avatar dependabot[bot] avatar lisolu avatar zeepickler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.