guard-delayed 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.markdown +3 -1
- data/lib/guard/delayed/version.rb +1 -1
- data/lib/guard/delayed.rb +18 -13
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/README.markdown
CHANGED
data/lib/guard/delayed.rb
CHANGED
@@ -21,25 +21,24 @@ module Guard
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def start
|
24
|
-
system(
|
24
|
+
system(cmd, 'stop')
|
25
25
|
UI.info "Starting up delayed_job..."
|
26
26
|
args = "start"
|
27
|
-
args << "--
|
28
|
-
args << "--
|
29
|
-
args << "--
|
30
|
-
args << "--
|
31
|
-
args << "--
|
32
|
-
args << "--
|
33
|
-
args << "--
|
34
|
-
args << "--
|
35
|
-
args
|
36
|
-
system('script/delayed_job', args)
|
27
|
+
args << " --min-priority #{@options[:min_priority]}" if @options[:min_priority]
|
28
|
+
args << " --max-priority #{@options[:max_priority]}" if @options[:max_priority]
|
29
|
+
args << " --number_of_workers=#{@options[:number_of_workers]}" if @options[:number_of_workers]
|
30
|
+
args << " --pid-dir=#{@options[:pid_dir]}" if @options[:pid_dir]
|
31
|
+
args << " --identifier=#{@options[:identifier]}" if @options[:identifier]
|
32
|
+
args << " --monitor" if @options[:monitor]
|
33
|
+
args << " --sleep-delay #{@options[:sleep_delay]}" if @options[:sleep_delay]
|
34
|
+
args << " --prefix #{@options[:prefix]} " if @options[:prefix]
|
35
|
+
system(cmd, args)
|
37
36
|
end
|
38
37
|
|
39
38
|
# Called on Ctrl-C signal (when Guard quits)
|
40
39
|
def stop
|
41
40
|
UI.info "Stopping delayed_job..."
|
42
|
-
system(
|
41
|
+
system(cmd, 'stop')
|
43
42
|
end
|
44
43
|
|
45
44
|
# Called on Ctrl-Z signal
|
@@ -63,7 +62,13 @@ module Guard
|
|
63
62
|
private
|
64
63
|
|
65
64
|
def restart
|
66
|
-
system(
|
65
|
+
system(cmd, 'restart')
|
66
|
+
end
|
67
|
+
|
68
|
+
def cmd
|
69
|
+
command = "script/delayed_job"
|
70
|
+
command = "RAILS_ENV=#{@options[:environment]} #{command}" if @options[:environment]
|
71
|
+
command
|
67
72
|
end
|
68
73
|
end
|
69
74
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-delayed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.9
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Parry
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: guard
|