mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
15 lines
254 B
Ruby
15 lines
254 B
Ruby
require 'json'
|
|
|
|
payload = STDIN.read
|
|
if payload != ""
|
|
payload = JSON.parse(payload)
|
|
|
|
# payload contains checks
|
|
if payload["sleep"]
|
|
i = payload['sleep'].to_i
|
|
puts "Sleeping for #{i} seconds..."
|
|
sleep i
|
|
puts "I'm awake!"
|
|
end
|
|
end
|