Skip to content

Examples of using the disque_jockey gem to process background jobs.

Notifications You must be signed in to change notification settings

DevinRiley/disque_jockey_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DisqueJockey example workers

This repo provides examples of using disque_jockey workers to process jobs from a queue

Getting started

For this example project to run, you need a disque server running on localhost:7711

See https://github.com/antirez/disque for source and build instructions.

Once you have a disque server running locally, clone down this repo and cd into its directory

git clone [email protected]:DevinRiley/disque_jockey_examples.git
cd disque_jockey_examples

Then install disque_jockey and its dependencies

bundle install

Start the example workers by running disque_jockey from the command line (you must have already built and installed disque_jockey from your local disque_jockey repo).

disque_jockey start

You should see DisqueJockey begin logging to STDOUT, like so:

[2015-05-24T09:17:33] INFO  DisqueJockey: Starting worker group with PID 36175...
[2015-05-24T09:17:33] INFO  DisqueJockey: Starting worker group with PID 36176...
[2015-05-24T09:17:33] INFO  DisqueJockey: Launching 2 ExampleWorkers
[2015-05-24T09:17:33] INFO  DisqueJockey: Launching 2 ExampleWorkers
[2015-05-24T09:17:33] INFO  DisqueJockey: Launching 5 SecondExampleWorkers
[2015-05-24T09:17:33] INFO  DisqueJockey: Launching 5 SecondExampleWorkers

To publish new messages to the example workers and see them log the results

ruby publish.rb

About

Examples of using the disque_jockey gem to process background jobs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages