capistrano-resque 0.0.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,17 @@
1
- # 2.0.8
1
+ # 0.1.0
2
+ Interval is configurable
3
+ Fix issue where pids weren't created correctly
4
+
5
+ # 0.0.9
6
+
7
+ Start workers in threads
8
+
9
+ # 0.0.8
2
10
 
3
11
  Using stable branch of Resque, rather than the released gem, to take advantage of logging ability, losing shell redirection
4
12
  Using SIGQUIT to kill processes as they aren't terminating properly
5
13
 
6
14
 
7
- # 2.0.7
15
+ # 0.0.7
8
16
 
9
- Different workers for different roles
17
+ Different workers for different roles
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- capistrano-resque (0.0.9)
15
+ capistrano-resque (0.1.0)
16
16
  capistrano
17
17
  resque
18
18
  resque-scheduler
@@ -20,7 +20,7 @@ PATH
20
20
  GEM
21
21
  remote: http://rubygems.org/
22
22
  specs:
23
- capistrano (2.13.5)
23
+ capistrano (2.14.1)
24
24
  highline
25
25
  net-scp (>= 1.0.0)
26
26
  net-sftp (>= 2.0.0)
@@ -32,7 +32,7 @@ GEM
32
32
  net-ssh (>= 1.99.1)
33
33
  net-sftp (2.0.5)
34
34
  net-ssh (>= 2.0.9)
35
- net-ssh (2.6.1)
35
+ net-ssh (2.6.3)
36
36
  net-ssh-gateway (1.1.0)
37
37
  net-ssh (>= 1.99.1)
38
38
  rack (1.4.1)
data/README.md CHANGED
@@ -40,7 +40,7 @@ cap resque:status # Check workers status
40
40
  cap resque:start # Start Resque workers
41
41
  cap resque:stop # Quit running Resque workers
42
42
  cap resque:restart # Restart running Resque workers
43
- cap resque:scheduler:restart #
43
+ cap resque:scheduler:restart #
44
44
  cap resque:scheduler:start # Starts Resque Scheduler with default configs
45
45
  cap resque:scheduler:stop # Stops Resque Scheduler
46
46
  ```
@@ -73,6 +73,15 @@ Resque.logger = Logger.new("new_resque_log_file")
73
73
 
74
74
  The chatter on: https://github.com/defunkt/resque/pull/450 gives more information. If using HEAD of this resque branch doesn't work for you, then pin to v0.0.7 of this project.
75
75
 
76
+ ### Limitations
77
+
78
+ Starting workers is done concurently via capistrano and you are limited by ssh connections limit on your server (default limit is 10)
79
+
80
+ in order to use more workers please change your sshd configurtion (/etc/ssh/sshd_config)
81
+
82
+ MaxStartups 100
83
+
84
+
76
85
  ### Contributing
77
86
 
78
87
  1. Fork it
@@ -8,6 +8,7 @@ module CapistranoResque
8
8
 
9
9
  _cset(:workers, {"*" => 1})
10
10
  _cset(:resque_kill_signal, "QUIT")
11
+ _cset(:interval, "5")
11
12
 
12
13
  def workers_roles
13
14
  return workers.keys if workers.first[1].is_a? Hash
@@ -33,8 +34,8 @@ module CapistranoResque
33
34
 
34
35
  def start_command(queue, pid)
35
36
  "cd #{current_path} && RAILS_ENV=#{rails_env} QUEUE=\"#{queue}\" \
36
- PIDFILE=#{pid} BACKGROUND=yes VERBOSE=1 \
37
- #{fetch(:bundle_cmd, "bundle")} exec rake environment resque:work"
37
+ PIDFILE=#{pid} BACKGROUND=yes VERBOSE=1 INTERVAL=#{interval} \
38
+ #{fetch(:bundle_cmd, "bundle")} exec rake resque:work"
38
39
  end
39
40
 
40
41
  def stop_command
@@ -72,7 +73,7 @@ module CapistranoResque
72
73
  threads = []
73
74
  number_of_workers.times do
74
75
  pid = "./tmp/pids/resque_work_#{worker_id}.pid"
75
- threads << Thread.new { run(start_command(queue, pid), :roles => role) }
76
+ threads << Thread.new(pid) { |pid| run(start_command(queue, pid), :roles => role) }
76
77
  worker_id += 1
77
78
  end
78
79
  threads.each(&:join)
@@ -96,7 +97,7 @@ module CapistranoResque
96
97
  stop
97
98
  start
98
99
  end
99
-
100
+
100
101
  namespace :scheduler do
101
102
  desc "Starts resque scheduler with default configs"
102
103
  task :start, :roles => :resque_scheduler do
@@ -1,5 +1,5 @@
1
1
  module CapistranoResque
2
2
  unless defined?(::CapistranoResque::VERSION)
3
- VERSION = "0.0.9".freeze
3
+ VERSION = "0.1.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-09 00:00:00.000000000 Z
12
+ date: 2013-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -96,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 1.8.24
99
+ rubygems_version: 1.8.23
100
100
  signing_key:
101
101
  specification_version: 3
102
102
  summary: Resque integration for Capistrano
103
103
  test_files: []
104
- has_rdoc: