Browse Source

Added argument documentation for watch

koerschens 3 năm trước cách đây
mục cha
commit
0b9614d949
1 tập tin đã thay đổi với 9 bổ sung2 xóa
  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",