Coder Social home page Coder Social logo

ebelair / clockwork-rails-dj Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamwiggins/clockwork-rails-dj

0.0 0.0 0.0 274 KB

A sample app using Clockwork with a Rails/DJ app to fetch market prices periodically

Ruby 71.47% HTML 10.94% JavaScript 17.59%

clockwork-rails-dj's Introduction

Sample Clockwork App (Rails/DJ)

Clockwork is a library to replace cron for scheduling jobs from within an application. This is a sample application which uses the Rails 3 web framework, a SQLite database, and the Delayed Job queueing system to demonstrate Clockwork's use.

The app fetches the Dow Jones index from Google Finance once every three minutes, and puts the results in the SQLite database. The web app shows the history of all fetched data points.

Prerequistes

  • Ruby
  • Bundler (gem install bundler)
  • SQLite3 (brew install sqlite)

Setup

$ git clone git://github.com/adamwiggins/clockwork-rails-dj.git
$ cd clockwork-rails-dj
$ bundle install
$ bundle exec rake db:migrate

Running the app

$ bundle exec rails server &
$ bundle exec rake jobs:work & 
$ bundle exec clockwork app/clock.rb &

Alternately, use Foreman (gem install foreman):

$ foreman start

Visit http://localhost:3000/ and you should see the first data point.

clockwork-rails-dj's People

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.