瀏覽代碼

Added argument documentation for watch

koerschens 3 年之前
父節點
當前提交
0b9614d949
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      python/gpu_status.py

+ 9 - 2
python/gpu_status.py

@@ -1,11 +1,18 @@
 import argparse
-from typing import Protocol
-
 import requests
+
 from renderer import Renderer
 
 parser = argparse.ArgumentParser(description="Prints the status of server nodes and their GPUs.")
 
+
+parser.add_argument(
+    "watch", 
+    type=str,
+    nargs="?",
+    choices=("watch",),
+    help="If the word 'watch' is supplied as first argument, the script will be run in watch mode. Supplying this argument in any other position will have no effect."
+)
 parser.add_argument(
     "-s", 
     "--server",