fanforce-plugin-worker 2.0.0.rc12 → 2.0.0.rc13

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: e756e918d0ff2a7dc9070491506c6e61042f56f5
4
- data.tar.gz: 5c88d554a6bf80df472c8af395665fe96f645d38
3
+ metadata.gz: 86182c82ab7eb6ff79567ff388beb6b1ff8fdb7e
4
+ data.tar.gz: d3743d027e41a70e00bf8db86602b33eab9f8b35
5
5
  SHA512:
6
- metadata.gz: e59fab71af38e7301e2e890948f5dae785949464c3896ab2973283e2a7e745a0c5c03981283657a0832f1c67d2e4319c10213fd0541585c5276cc2b65227044d
7
- data.tar.gz: 8d377a77dd2eebcd53477a974ebdde7aa13893fd4334aa3fb86c48a9882a33eab93f30e74b93bf93ba89e3061977c866f70fb06ee574a584616431cc24c8f293
6
+ metadata.gz: 0f467e9e3116082fad953ccd08839055e67f38e5067e626959acefd502e2a1f17a9232009d458a25072926b81df75f0be4b7ac38bc3a660ec19f433a49b13ea1
7
+ data.tar.gz: 3ec7ee37daf18083c32fb51aeb183caf2fe94fdf07780fc24edc28979f25f9a13a9240f4fa4bdb694855746446bf136151c3293fc43cfd43295f140c181c00e5
@@ -22,7 +22,7 @@ if ENV['PWD'] == '/mnt/task'
22
22
  PluginWorker.is_iron_worker(true)
23
23
 
24
24
  # When running in Docker, IronWorker no longer provides the params method
25
- def params; IronWorker.payload end
25
+ def worker_data; IronWorker.payload end
26
26
 
27
27
  puts 'FINISHED LOADING PLUGIN'
28
28
  else
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class PluginWorker
3
- VERSION = '2.0.0.rc12'
3
+ VERSION = '2.0.0.rc13'
4
4
  end
5
5
  end
@@ -62,8 +62,7 @@ class Fanforce::PluginWorker
62
62
  exec_file = "#{Plugin.base_dir}/workers/#{queue_id}.rb"
63
63
  raise "Ruby file is missing: #{exec_file}" if !File.exists?(exec_file)
64
64
  raise "RACK_ENV must be development: #{ENV['RACK_ENV']}" if ENV['RACK_ENV'] != 'development'
65
- params = {queue_id: queue_id, params: params}
66
- binding.eval(File.open(exec_file).read, exec_file)
65
+ Local.run_it(exec_file, queue_id: queue_id, params: params)
67
66
  end
68
67
 
69
68
  def self.run(worker_data, min_execution_time=300, &code_block)
@@ -74,4 +73,10 @@ class Fanforce::PluginWorker
74
73
  end
75
74
  end
76
75
 
76
+ class Local
77
+ def self.run_it(exec_file, worker_data)
78
+ binding.eval(File.open(exec_file).read, exec_file)
79
+ end
80
+ end
81
+
77
82
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-plugin-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc12
4
+ version: 2.0.0.rc13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark