Commit 5175c2dc authored by Jérome Perrin's avatar Jérome Perrin

fix indentation

parent 4d7a2a28
......@@ -114,22 +114,22 @@ def runWithTimeout(func, timeout, *args, **kw):
return queue.get()
def _runWithTimeout(queue, func, args, kw):
import signal
import traceback
if hasattr(signal, 'SIGUSR1'):
signal.signal(signal.SIGUSR1, lambda sig, stack: traceback.print_stack(stack))
print "To see current traceback:"
print " kill -SIGUSR1 %s" % os.getpid()
# print a traceback when terminated.
def handler(sig, stack):
app.logger.error("Terminating")
app.logger.info("".join(traceback.format_stack(stack)))
sys.exit(0)
signal.signal(signal.SIGTERM, handler)
queue.put(func(*args, **kw))
import signal
import traceback
if hasattr(signal, 'SIGUSR1'):
signal.signal(signal.SIGUSR1, lambda sig, stack: traceback.print_stack(stack))
print "To see current traceback:"
print " kill -SIGUSR1 %s" % os.getpid()
# print a traceback when terminated.
def handler(sig, stack):
app.logger.error("Terminating")
app.logger.info("".join(traceback.format_stack(stack)))
sys.exit(0)
signal.signal(signal.SIGTERM, handler)
queue.put(func(*args, **kw))
@app.route("/runSimulation", methods=["POST", "OPTIONS"])
def runSimulation():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment