Преглед на файлове

Make the server run time configurable

Vadim Markovtsev преди 7 години
родител
ревизия
7ef6ec890f
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      labours.py

+ 3 - 2
labours.py

@@ -883,10 +883,11 @@ def main():
         couples()
 
     if web_server.running:
-        print("Sleeping for 60 seconds, safe to Ctrl-C")
+        secs = int(os.getenv("COUPLES_SERVER_TIME", "60"))
+        print("Sleeping for %d seconds, safe to Ctrl-C" % secs)
         sys.stdout.flush()
         try:
-            time.sleep(60)
+            time.sleep(secs)
         except KeyboardInterrupt:
             pass
         web_server.stop()