Skip to content

Commit 01c19fe

Browse files
committed
Fxied sidekiq 3.0.0
1 parent 20e345e commit 01c19fe

File tree

7 files changed

+7
-29
lines changed

7 files changed

+7
-29
lines changed

Gemfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
gem 'sidekiq'
2-
gem 'slim', '>= 1.3.0'
3-
gem 'sinatra', '>= 1.3.0', :require => nil
4-
5-
gem 'sidekiq-status'
6-
gem 'sidekiq-unique-jobs'
7-
gem 'sidekiq-failures'
8-
9-
gem 'clockwork'
10-
gem 'daemons'
2+
gem 'sinatra'

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
Redmine Sidekiq
22
===============
33

4-
Background jobs will use the [Sidekiq](https://github.com/mperham/sidekiq) on Redmine.
4+
Background jobs will use the [Sidekiq](https://github.com/mperham/sidekiq) on Redmine.
55
You can Monitoring easily used by [Sidekiq plugin](http://www.redmine.org/plugins/sidekiq).
66

77
## Features
88

99
* Administrator can use the Sidekiq Web UI from the top menu.
1010
* Add to autoload_paths of the Plugin `/app/workers`.
11-
* Add Middleware of `sidekiq-status`.
1211

1312
## Installation
1413

@@ -47,7 +46,7 @@ Example of Sidekiq worker.
4746
./plugins/redmine_sidekiq/workers/sandbox_worker.rb
4847
```
4948

50-
### Sandbox Web UI
49+
### Sandbox Web UI
5150
Enqueue from the Web UI.
5251

5352
```
@@ -67,6 +66,6 @@ Enqueue from the command line.
6766
$ script/rails runner 'SandboxWorker.perform_async'
6867
```
6968

70-
## License
69+
## License
7170

7271
* MIT

app/workers/sandbox_worker.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
class SandboxWorker
22
include Sidekiq::Worker
3-
include Sidekiq::Status::Worker
4-
sidekiq_options retry: 2, unique: true
3+
sidekiq_options retry: 2
54

65
def perform(name=nil, count=nil)
76
puts 'Doing sandbox work'

config/sidekiq.yml.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ production:
22
redis:
33
url: redis://localhost:6379/8
44
namespace: mynamespace
5-
status:
6-
expiration: 30

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Redmine::Plugin.register :redmine_sidekiq do
55
name 'Redmine Sidekiq plugin'
66
description 'This is a Sidekiq plugin for Redmine'
7-
version '1.1.0'
7+
version '2.0.0'
88
url 'https://github.com/ogom/redmine_sidekiq'
99
author_url 'mailto:[email protected]'
1010
author 'ogom'

lib/redmine_sidekiq/configure.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
require 'sidekiq'
2-
require 'sidekiq-status'
32

43
module RedmineSidekiq
54
class Configure
65
file = File.join(Rails.root, 'plugins/redmine_sidekiq/config/sidekiq.yml')
76
if File.exist?(file)
87
config = YAML.load_file(file)[Rails.env]
98
redis_conf = config['redis'].symbolize_keys
10-
st_expire = config['status']['expiration'].to_i
11-
else
12-
st_expire = 30
139
end
1410

1511
Sidekiq.configure_server do |config|
1612
config.redis = redis_conf if redis_conf
17-
config.server_middleware do |chain|
18-
chain.add Sidekiq::Status::ServerMiddleware, expiration: st_expire.minutes
19-
end
2013
end
2114

2215
Sidekiq.configure_client do |config|
2316
config.redis = redis_conf if redis_conf
24-
config.client_middleware do |chain|
25-
chain.add Sidekiq::Status::ClientMiddleware
26-
end
2717
end
2818

2919
Sidekiq::Extensions::ActiveRecord.module_eval do

lib/redmine_sidekiq/rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module RedmineSidekiq
22
class Rails
33
Dir.glob(File.join(Redmine::Plugin.directory, '*')).sort.each do |directory|
44
if File.directory?(directory)
5-
workers = File.join(directory, "app", "workers")
5+
workers = File.join(directory, 'app', 'workers')
66
if File.directory?(workers)
77
ActiveSupport::Dependencies.autoload_paths += [workers]
88
end

0 commit comments

Comments
 (0)