Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

kfatehi/react-bull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
  })
})

About

React components for bull job queue

Resources

License

Stars

Watchers

Forks

Packages

No packages published