<commit_before># Sidekiq::ResqueStatus

Sidekiq-resque_status is a Sidekiq plug-in that will allow you to manage and check the progress of your resque jobs and sidekiq workers under the same place: the resque web-ui interface. Sidekiq and Resque are two different queuing system and depending on the type of jobs you have to process you might want to use one or the other. These two queuing system have their own web interface. This gem allow you, in case you are using both queuing system in one project, to group them under the resque web-ui. 

## Installation

Add this line to your application's Gemfile:

    gem 'sidekiq-resque_status'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install sidekiq-resque_status

## Usage

# Personalize your worker:

To add Sidekiq worker to your resque web-ui you just need inherit your worker class with SidekiqWorkerWithStatus

		class SleepingJob < SidekiqWorkerWithStatus
		  def perform(*args)
		    sleep args[0] || 0.1
		  end
		end 

# Set up your Sidekiq connection base on your Resque one
	
In order for sidekiq-resque_status to work properly you need to tell sidekiq to use the same connection as Resque (same namespace, same url).
You can do so by creating a config file (such as sidekiq_config.rb) and doing:

		Sidekiq.configure_server do |config|
		  config.redis = {:namespace => Resque.redis.namespace, :url => url }
		end

		Sidekiq.configure_client do |config|
		  config.redis = { :namespace => Resque.redis.namespace, :url => url }
		end	

# Add the sidekiq-resque_status middleware to the Sidekiq server and client middleware

		Sidekiq.configure_server do |config|
		  config.server_middleware do |chain|
		    chain.add Sidekiq::Status::ServerMiddleware
		    chain.add Sidekiq::Middleware::Server::Stats::ResqueLike
		  end
		end

		Sidekiq.configure_client do |config|
		  config.client_middleware do |chain|
		    chain.add Sidekiq::Status::ClientMiddleware
		    chain.add Sidekiq::Middleware::Client::Stats::ResqueLike
		  end
		end	

## Contributing<commit_msg>updated documentation<commit_after># Sidekiq::ResqueStatus

Sidekiq-resque_status is a Sidekiq plug-in that will allow you to manage and check the progress of your resque jobs and sidekiq workers under the same place: the resque web-ui interface. Sidekiq and Resque are two different queuing system and depending on the type of jobs you have to process you might want to use one or the other. These two queuing system have their own web interface. This gem allow you, in case you are using both queuing system in one project, to group them under the resque web-ui. 

## Installation

Add this line to your application's Gemfile:

    gem 'sidekiq-resque_status'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install sidekiq-resque_status

## Usage

### Personalize your worker:

To add Sidekiq worker to your resque web-ui you just need inherit your worker class with SidekiqWorkerWithStatus

		class SleepingJob < SidekiqWorkerWithStatus
		  def perform(*args)
		    sleep args[0] || 0.1
		  end
		end 

### Set up your Sidekiq connection base on your Resque one
	
In order for sidekiq-resque_status to work properly you need to tell sidekiq to use the same connection as Resque (same namespace, same url).
You can do so by creating a config file (such as sidekiq_config.rb) and doing:

		Sidekiq.configure_server do |config|
		  config.redis = {:namespace => Resque.redis.namespace, :url => url }
		end

		Sidekiq.configure_client do |config|
		  config.redis = { :namespace => Resque.redis.namespace, :url => url }
		end	

### Configure Sidekiq server and client middleware

In the same config file you just have to add sidekiq-status and sidekiq-resque_status to Sidekiq middleware.

		Sidekiq.configure_server do |config|
		  config.server_middleware do |chain|
		    chain.add Sidekiq::Status::ServerMiddleware
		    chain.add Sidekiq::Middleware::Server::Stats::ResqueLike
		  end
		end

		Sidekiq.configure_client do |config|
		  config.client_middleware do |chain|
		    chain.add Sidekiq::Status::ClientMiddleware
		    chain.add Sidekiq::Middleware::Client::Stats::ResqueLike
		  end
		end	

... And that's it, you're all set

## Contributing
{'fraction_non_alphanumeric': 0.064196365352844, 'fraction_numerical': 0.0014160962945480293, 'mean_word_length': 3.9567251461988304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5227999', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1228, 'n_words': 507}