capistrano-resque 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  source "http://rubygems.org"
2
-
2
+ gem 'resque', :git => 'git@github.com:sj26/resque.git', :branch => 'logfile'
3
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,3 +1,14 @@
1
+ GIT
2
+ remote: git@github.com:sj26/resque.git
3
+ revision: 05e4c5e6f92fe62b25db40984b20dad4b9f870d8
4
+ branch: logfile
5
+ specs:
6
+ resque (1.19.0)
7
+ multi_json (~> 1.0)
8
+ redis-namespace (~> 1.0.2)
9
+ sinatra (>= 0.9.2)
10
+ vegas (~> 0.1.2)
11
+
1
12
  PATH
2
13
  remote: .
3
14
  specs:
@@ -7,13 +18,14 @@ PATH
7
18
  GEM
8
19
  remote: http://rubygems.org/
9
20
  specs:
10
- capistrano (2.11.2)
21
+ capistrano (2.12.0)
11
22
  highline
12
23
  net-scp (>= 1.0.0)
13
24
  net-sftp (>= 2.0.0)
14
25
  net-ssh (>= 2.0.14)
15
26
  net-ssh-gateway (>= 1.1.0)
16
27
  highline (1.6.11)
28
+ multi_json (1.3.4)
17
29
  net-scp (1.0.4)
18
30
  net-ssh (>= 1.99.1)
19
31
  net-sftp (2.0.5)
@@ -21,9 +33,23 @@ GEM
21
33
  net-ssh (2.3.0)
22
34
  net-ssh-gateway (1.1.0)
23
35
  net-ssh (>= 1.99.1)
36
+ rack (1.4.1)
37
+ rack-protection (1.2.0)
38
+ rack
39
+ redis (2.2.2)
40
+ redis-namespace (1.0.3)
41
+ redis (< 3.0.0)
42
+ sinatra (1.3.2)
43
+ rack (~> 1.3, >= 1.3.6)
44
+ rack-protection (~> 1.2)
45
+ tilt (~> 1.3, >= 1.3.3)
46
+ tilt (1.3.3)
47
+ vegas (0.1.11)
48
+ rack (>= 1.0.0)
24
49
 
25
50
  PLATFORMS
26
51
  ruby
27
52
 
28
53
  DEPENDENCIES
29
54
  capistrano-resque!
55
+ resque!
data/README.md CHANGED
@@ -1,3 +1,22 @@
1
1
  # Capistrano Resque
2
2
 
3
- todo
3
+ ### In your Capfile:
4
+
5
+ ```
6
+ require "capistrano-resque"
7
+ ```
8
+
9
+ ### In your deploy.rb:
10
+
11
+ ```
12
+ set :queue_name, "my_queue_name"
13
+ set :num_of_queues, 2
14
+ ```
15
+
16
+ Then, running cap -vT | grep resque should give you...
17
+
18
+ ```
19
+ ➔ cap -vT | grep resque
20
+ cap resque:start_workers # Start Resque workers
21
+ cap resque:stop_workers # Quit running Resque workers
22
+ ```
@@ -14,6 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
15
  gem.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
16
16
  gem.require_paths = ["lib"]
17
-
17
+
18
18
  gem.add_runtime_dependency "capistrano"
19
19
  end
@@ -10,7 +10,7 @@ module CapistranoResque
10
10
  _cset(:queue_name, "*")
11
11
  _cset(:app_env, (fetch(:rails_env) rescue "production"))
12
12
  _cset(:verbosity, 1)
13
-
13
+
14
14
  def remote_file_exists?(full_path)
15
15
  "true" == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
16
16
  end
@@ -26,8 +26,8 @@ module CapistranoResque
26
26
  num_of_queues.times do |i|
27
27
  pid = "./tmp/pids/resque_worker_#{i}.pid"
28
28
  run "cd #{current_path} && RAILS_ENV=#{app_env} QUEUE=#{queue_name} \
29
- PIDFILE=#{pid} BACKGROUND=yes VVERBOSE=#{verbosity} \
30
- bundle exec rake environment resque:work > log/resque_worker_#{i}.log"
29
+ PIDFILE=#{pid} BACKGROUND=yes LOGFILE=./resque-worker#{i}.log VVERBOSE=#{verbosity} \
30
+ bundle exec rake environment resque:work"
31
31
  end
32
32
  end
33
33
 
@@ -1,5 +1,5 @@
1
1
  module CapistranoResque
2
2
  unless defined?(::CapistranoResque::VERSION)
3
- VERSION = "0.0.1".freeze
3
+ VERSION = "0.0.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-resque
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steven Shingler
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-18 00:00:00 Z
18
+ date: 2012-05-05 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: capistrano
@@ -40,6 +40,7 @@ extensions: []
40
40
  extra_rdoc_files: []
41
41
 
42
42
  files:
43
+ - .gitignore
43
44
  - Gemfile
44
45
  - Gemfile.lock
45
46
  - README.md