Skip to content
React components for bull job queue
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src plub delete all call Nov 2, 2014
vendor
.gitignore
LICENSE
README.md Merge branch 'master' of github.com:keyvanfatehi/react-bull Sep 26, 2014
index.js load react externally, use window as last resort Sep 26, 2014
package.json

README.md

react-bull

React components & frontend code for bull job queue, based heavily on Matador

Designed to consume the API of express-bull

Requirements

  • Browserify & reactify
  • jQuery as supplied by you
  • The scripts in vendor

Usage

npm install --save react-bull

Markup

<div class='jobs' data-category='wait'></div>
<div class='jobs' data-category='active'></div>
<div class='jobs' data-category='failed'></div>
<div class='jobs' data-category='complete'></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/0.11.2/react.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="/vendor/jquery.noty.js"></script>
<script src="/vendor/jquery.blockUI.js"></script>
<script src="/bundle.js"></script>

Script

var ReactBull = require('react-bull')(React)

$(function(){
  $('.jobs[data-category]').each(function(i, el) {
    var category = $(el).data('category')
    var jobs = new ReactBull.JobsController(category, {
      resourcePath: '/api/v1/jobs',
      poll: 5000 // optional
    });
    jobs.mountInterface(el);
  })
})
You can’t perform that action at this time.