Sha256: 045f11fb17aa13916f865a3a611d7855e87c101361c2b43e37a3ba8f685516f8

Contents?: true

Size: 522 Bytes

Versions: 15

Compression:

Stored size: 522 Bytes

Contents

class Jets::Poly
  class PythonExecutor < BaseExecutor
    # Code for wrapper script that mimics lambda execution. Wrapper script usage:
    #
    #   python WRAPPER_SCRIPT EVENT
    #
    # Example:
    #
    #   python /tmp/jets/demo/executor/20180804-12816-imqb9/lambda_executor.py '{}'
    def code
      <<-EOL
import sys
import json
from #{@definition.meth} import #{handler}
event = json.loads(sys.argv[1])
context = {}
resp = #{handler}(event, context)
result = json.dumps(resp)
print(result)
EOL
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/poly/python_executor.rb
jets-5.0.12 lib/jets/poly/python_executor.rb
jets-5.0.11 lib/jets/poly/python_executor.rb
jets-5.0.10 lib/jets/poly/python_executor.rb
jets-5.0.9 lib/jets/poly/python_executor.rb
jets-5.0.8 lib/jets/poly/python_executor.rb
jets-5.0.7 lib/jets/poly/python_executor.rb
jets-5.0.6 lib/jets/poly/python_executor.rb
jets-5.0.5 lib/jets/poly/python_executor.rb
jets-5.0.4 lib/jets/poly/python_executor.rb
jets-5.0.3 lib/jets/poly/python_executor.rb
jets-5.0.2 lib/jets/poly/python_executor.rb
jets-5.0.1 lib/jets/poly/python_executor.rb
jets-5.0.0 lib/jets/poly/python_executor.rb
jets-5.0.0.beta1 lib/jets/poly/python_executor.rb