open-nomad/client/driver/test-resources/docker/main.py
Chris Bednarski aa3937f248 Added example python and java apps for testing
- Java example from @catsby
2015-09-04 11:13:24 -07:00

18 lines
314 B
Python

import signal
import time
# Setup handler for sigterm so we can exit when docker stop is called.
def term(signum, stack_Frame):
exit(1)
signal.signal(signal.SIGTERM, term)
print ("Starting")
max = 3
for i in range(max):
time.sleep(1)
print("Heartbeat {0}/{1}".format(i + 1, max))
print("Exiting")