Class: Vx::Worker::RunScript
- Inherits:
-
Struct
- Object
- Struct
- Vx::Worker::RunScript
- Includes:
- Common::Helper::UploadShCommand, Helper::Config, Helper::Logger
- Defined in:
- lib/vx/worker/middlewares/run_script.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
Methods included from Helper::Config
Methods included from Helper::Logger
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
6 7 8 |
# File 'lib/vx/worker/middlewares/run_script.rb', line 6 def app @app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vx/worker/middlewares/run_script.rb', line 12 def call(env) if env.spawner code = run_script(env) run_after_script(env) if code == 0 app.call env else case read_state(env) when "script" code else code * -1 end end else app.call env end end |