Sha256: 911cc27b84f08cfb9cb3d5fbe37f9b826fcfb867dc5960555a7aaf93e99c1ec6
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
KueStatus Widget ===== ![](preview.png) A widget shows current status of [Kue](https://github.com/learnboost/kue) job queue. ## Usage Add the widget HTML to your dashboard ```html <li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="kue-information" data-view="KueStatus" data-title="Kue information"></div> </li> ```` ## Job An example of `jobs/kue_status_job.rb` ```ruby # built-in Kue helpers require 'dashing-contrib/bottles/kue' SCHEDULER.every '10s' do # Use .env file in your project to extract endpoint value # if dev and production enviroment are different client = DashingContrib::Kue::Client.new(endpoint: 'http://kue.example.com') stats = client.stats metrics = [ { label: 'Processed', value: stats[:complete_count] }, { label: 'Processing', value: stats[:active_count] }, { label: 'Failed', value: stats[:failed_count] }, { label: 'Queued', value: stats[:inactive_count] }, { label: 'Delayed', value: stats[:delayed_count] } ] send_event('kue-information', { metrics: metrics } ) end ````
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dashing-contrib-0.1.0 | lib/dashing-contrib/assets/widgets/kue_status/README.md |
dashing-contrib-0.0.5 | lib/dashing-contrib/assets/widgets/kue_status/README.md |