simple_worker 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/simple_worker/base.rb +14 -0
  2. metadata +1 -1
@@ -348,6 +348,19 @@ module SimpleWorker
348
348
  return merged, rfile, subclass
349
349
  end
350
350
 
351
+ def self.extract_merged_workers(worker)
352
+ merged_workers = worker.class.instance_variable_get(:@merged_workers)
353
+ SimpleWorker.logger.debug "Looking for merged_workers in #{worker.class.name}: #{merged_workers.inspect}"
354
+ ret = []
355
+ if merged_workers && merged_workers.size > 0
356
+ merged_workers.each do |mw|
357
+ SimpleWorker.logger.debug "merged worker found in #{worker.class.name}: #{mw.inspect}"
358
+ ret << mw[0]
359
+ end
360
+ end
361
+ ret
362
+ end
363
+
351
364
  def upload_if_needed
352
365
  check_service
353
366
  SimpleWorker.service.check_config
@@ -366,6 +379,7 @@ module SimpleWorker
366
379
  mw_instantiated.upload
367
380
 
368
381
  merged, rfile, subclass = SimpleWorker::Base.extract_superclasses_merges(mw_instantiated, merged)
382
+ merged += SimpleWorker::Base.extract_merged_workers(mw_instantiated)
369
383
 
370
384
  end
371
385
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simple_worker
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.5
5
+ version: 0.6.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Travis Reeder