mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Renamed a bunch of images to use fnproject org. * Multi-stage build for Docker. * Added tmp vendor dirs to gitignore. * Run docker-build at beginning of test.
17 lines
371 B
Ruby
17 lines
371 B
Ruby
require 'json'
|
|
|
|
payload = STDIN.read
|
|
if payload != ""
|
|
payload = JSON.parse(payload)
|
|
|
|
# payload contains checks
|
|
if payload["sleep"]
|
|
i = payload['sleep'].to_i
|
|
STDERR.puts "Sleeping for #{i} seconds..."
|
|
sleep i
|
|
puts "I'm awake!" # sending this to stdout for sync response
|
|
end
|
|
else
|
|
puts "ERROR: please pass in a sleep value: {\"sleep\": 5}"
|
|
end
|