ayl-beanstalk 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/ayl-beanstalk.gemspec +2 -2
- data/bin/ayl_beanstalk +4 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/ayl-beanstalk.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ayl-beanstalk"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["j0hnds@gmail.com"]
|
12
|
-
s.date = "2012-11-
|
12
|
+
s.date = "2012-11-12"
|
13
13
|
s.description = "Ayl extension to provide beanstalk support."
|
14
14
|
s.email = "j0hnds@gmail.com"
|
15
15
|
s.executables = ["ayl_beanstalk", "ayl_worker", "ayl_worker_control"]
|
data/bin/ayl_beanstalk
CHANGED
@@ -7,6 +7,8 @@ require 'date'
|
|
7
7
|
require 'optparse'
|
8
8
|
require 'beanstalk-client'
|
9
9
|
|
10
|
+
DEFAULT_COMMAND = 'statistics'
|
11
|
+
|
10
12
|
SLEEP_COMMAND = {
|
11
13
|
:type => :ayl,
|
12
14
|
:code => 'Kernel.sleep(20)' # This message will cause the worker to sleep for 20 seconds
|
@@ -270,11 +272,10 @@ begin
|
|
270
272
|
options[:port],
|
271
273
|
options[:tube])
|
272
274
|
|
273
|
-
|
274
|
-
command = ARGV.first
|
275
|
+
command = ARGV.shift || DEFAULT_COMMAND
|
275
276
|
raise "Invalid command: #{command}" unless beanstalker.respond_to?(command)
|
276
277
|
|
277
|
-
arguments = ARGV
|
278
|
+
arguments = ARGV
|
278
279
|
beanstalker.send(command, *arguments)
|
279
280
|
rescue Exception => ex
|
280
281
|
puts "Error: #{ex.message}"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ayl-beanstalk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- j0hnds@gmail.com
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-11-
|
13
|
+
date: 2012-11-12 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ayl
|
@@ -150,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
150
|
requirements:
|
151
151
|
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
hash: -
|
153
|
+
hash: -1289886184004926286
|
154
154
|
segments:
|
155
155
|
- 0
|
156
156
|
version: "0"
|