fanforce-plugin-worker 2.0.0.rc12 → 2.0.0.rc13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86182c82ab7eb6ff79567ff388beb6b1ff8fdb7e
|
4
|
+
data.tar.gz: d3743d027e41a70e00bf8db86602b33eab9f8b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
25
|
+
def worker_data; IronWorker.payload end
|
26
26
|
|
27
27
|
puts 'FINISHED LOADING PLUGIN'
|
28
28
|
else
|
@@ -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
|
-
|
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
|