beanstalker 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beanstalker}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gleb Pomykalov"]
12
- s.date = %q{2010-07-16}
12
+ s.date = %q{2010-07-19}
13
13
  s.description = %q{Beanstalker is a tool for executing long tasks in background in our rails application.}
14
14
  s.email = %q{glebpom@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -74,15 +74,18 @@ class << Beanstalker::Queue
74
74
  code = packed = interpolator
75
75
  else
76
76
  code = gen(obj, sel, args)
77
- packed = pkg(code, worker_opts)
77
+ packed = pkg(code, worker_opts, obj, sel)
78
78
  end
79
79
 
80
80
  RAILS_DEFAULT_LOGGER.info("put #{pri} #{code} to #{tube}")
81
81
  put!(packed, pri, delay, ttr, tube)
82
82
  end
83
83
 
84
- def pkg(code, opts)
85
- opts.merge(:type => :rails, :code => code)
84
+ def pkg(code, opts, obj, sel)
85
+ opts.merge(:type => :rails,
86
+ :code => code,
87
+ :class => obj.class == 'Class' ? obj.name : obj.class.to_s,
88
+ :method => sel.to_s)
86
89
  end
87
90
 
88
91
  # Be careful not to pass in a selector that's not valid ruby source.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanstalker
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gleb Pomykalov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-16 00:00:00 +04:00
18
+ date: 2010-07-19 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency