fanforce-plugin-worker 2.0.0.rc9 → 2.0.0.rc10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1ffa6265e8b082c7f9757066462721b329f5d3a
4
- data.tar.gz: 962704858c259679756064bff4542f4ce018b349
3
+ metadata.gz: 683f1ab134ad184a10eaf72a77d470b58ff337e1
4
+ data.tar.gz: 19a9c9bade95b87d38bf468143265b9d3bb13f51
5
5
  SHA512:
6
- metadata.gz: 0a89751ade38ad7ab91e36ba96d477a8e7d1b05803640a87c550b305894d2843b10d7b20067b703a9c4cd131a9cf7ee373c82e1a8380ee6cda5715dc94ea01b7
7
- data.tar.gz: 82e3babf6a4bf39520d4057f350fec0d9d6a7b2ceee31dd8683fc9015a8d6af29cbcac3c688361c6e874c03b54f6507c30770bd4e9544c9c003cf7a426581ab5
6
+ metadata.gz: 57df5bd8fea25c3445ffcd03e305899619c3c1b01fd8b9b689163d8122ce7b9d92bc9ba54f0cd68a43b3a130823e74dae8e7d4f872fd4baaee8bab84ffcfef5a
7
+ data.tar.gz: 03eadaf69a7620da81ddc97bcd21d25968335c63d619f2cd7453dd9a869cfcede2bbca7abf19d79c6e2541b2c2454ccdb9025a98d421670f925f5676081de897
@@ -6,7 +6,7 @@ class Fanforce::PluginWorker::RunnerLocal
6
6
  MAX_EXECUTION_TIME = 3300
7
7
  class Timeout < RuntimeError; end
8
8
 
9
- def initialize(worker_data, min_execution_time=300, &code_block)
9
+ def initialize(worker_data, min_execution_time=300)
10
10
  raise "min_execution_time was set to #{min_execution_time}, which is #{min_execution_time - MAX_EXECUTION_TIME} seconds too long" if min_execution_time > MAX_EXECUTION_TIME
11
11
  log.debug '------------------------------------------------------------------------------------'
12
12
  log.debug 'LOADING WORKER ENV'
@@ -16,8 +16,6 @@ class Fanforce::PluginWorker::RunnerLocal
16
16
  @queue_id = worker_data[:queue_id] || (raise 'worker_data must contain queue_id')
17
17
  @current_params = MultiJson.load(worker_data[:params].to_json, symbolize_keys: true)
18
18
  @current_retries = 0
19
-
20
- run_job(&code_block)
21
19
  end
22
20
 
23
21
  def run_job(&code_block)
@@ -25,9 +23,10 @@ class Fanforce::PluginWorker::RunnerLocal
25
23
  log.debug 'PROCESSING JOB...'
26
24
  log.debug '------------------------------------------------------------------------------------'
27
25
 
28
- code_block.call(@current_params.clone, retries: @current_retries, queue_id: @queue_id)
26
+ response = code_block.call(@current_params.clone, retries: @current_retries, queue_id: @queue_id)
29
27
 
30
28
  log.debug 'WINDING DOWN WORKER!'
29
+ response
31
30
  end
32
31
 
33
32
  end
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class PluginWorker
3
- VERSION = '2.0.0.rc9'
3
+ VERSION = '2.0.0.rc10'
4
4
  end
5
5
  end
@@ -59,7 +59,7 @@ class Fanforce::PluginWorker
59
59
 
60
60
  def self.run(worker_data, min_execution_time=300, &code_block)
61
61
  if [true,'true'].include?(ENV['FANFORCE_WORKER_SHOULD_BYPASS_ENQUEUE'])
62
- RunnerLocal.new(worker_data, min_execution_time, &code_block)
62
+ RunnerLocal.new(worker_data, min_execution_time).run_job(&code_block)
63
63
  else
64
64
  Runner.new(worker_data, min_execution_time, &code_block)
65
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-plugin-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc9
4
+ version: 2.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iron_mq