capistrano-resque 0.0.8 → 0.0.9

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.
data/Changelog.md ADDED
@@ -0,0 +1,9 @@
1
+ # 2.0.8
2
+
3
+ Using stable branch of Resque, rather than the released gem, to take advantage of logging ability, losing shell redirection
4
+ Using SIGQUIT to kill processes as they aren't terminating properly
5
+
6
+
7
+ # 2.0.7
8
+
9
+ Different workers for different roles
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- capistrano-resque (0.0.8)
15
+ capistrano-resque (0.0.9)
16
16
  capistrano
17
17
  resque
18
18
  resque-scheduler
data/README.md CHANGED
@@ -1,7 +1,3 @@
1
- # Changes
2
-
3
- Using SIGQUIT to kill processes as they aren't terminating properly.
4
-
5
1
  # Capistrano Resque
6
2
 
7
3
  Basic tasks for putting some Resque in your Cap.
@@ -40,13 +36,13 @@ Running cap -vT | grep resque should give you...
40
36
 
41
37
  ```
42
38
  ➔ cap -vT | grep resque
43
- cap resque:status # Check worksers status
39
+ cap resque:status # Check workers status
44
40
  cap resque:start # Start Resque workers
45
41
  cap resque:stop # Quit running Resque workers
46
42
  cap resque:restart # Restart running Resque workers
47
43
  cap resque:scheduler:restart #
48
- cap resque:scheduler:start # Starts resque scheduler with default configs
49
- cap resque:scheduler:stop # Stops resque scheduler
44
+ cap resque:scheduler:start # Starts Resque Scheduler with default configs
45
+ cap resque:scheduler:stop # Stops Resque Scheduler
50
46
  ```
51
47
 
52
48
  ### Restart on deployment
@@ -77,6 +73,14 @@ Resque.logger = Logger.new("new_resque_log_file")
77
73
 
78
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.
79
75
 
76
+ ### Contributing
77
+
78
+ 1. Fork it
79
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
80
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
81
+ 4. Push to the branch (`git push origin my-new-feature`)
82
+ 5. Create new Pull Request
83
+
80
84
  ### License
81
85
 
82
86
  Please see the included LICENSE file.
@@ -47,7 +47,7 @@ module CapistranoResque
47
47
 
48
48
  def start_scheduler(pid)
49
49
  "cd #{current_path} && RAILS_ENV=#{rails_env} \
50
- PIDFILE=#{pid} BACKGROUND=yes \
50
+ PIDFILE=#{pid} BACKGROUND=yes VERBOSE=1 \
51
51
  #{fetch(:bundle_cmd, "bundle")} exec rake resque:scheduler"
52
52
  end
53
53
 
@@ -68,12 +68,14 @@ module CapistranoResque
68
68
  for_each_workers do |role, workers|
69
69
  worker_id = 1
70
70
  workers.each_pair do |queue, number_of_workers|
71
- puts "Starting #{number_of_workers} worker(s) with QUEUE: #{queue}"
71
+ logger.info "Starting #{number_of_workers} worker(s) with QUEUE: #{queue}"
72
+ threads = []
72
73
  number_of_workers.times do
73
74
  pid = "./tmp/pids/resque_work_#{worker_id}.pid"
74
- run(start_command(queue, pid), :roles => role)
75
+ threads << Thread.new { run(start_command(queue, pid), :roles => role) }
75
76
  worker_id += 1
76
77
  end
78
+ threads.each(&:join)
77
79
  end
78
80
  end
79
81
  end
@@ -1,5 +1,5 @@
1
1
  module CapistranoResque
2
2
  unless defined?(::CapistranoResque::VERSION)
3
- VERSION = "0.0.8".freeze
3
+ VERSION = "0.0.9".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.8
4
+ version: 0.0.9
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-01 00:00:00.000000000 Z
12
+ date: 2012-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -66,6 +66,7 @@ extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
68
  - .gitignore
69
+ - Changelog.md
69
70
  - Gemfile
70
71
  - Gemfile.lock
71
72
  - LICENSE