Эх сурвалжийг харах

Added argument documentation for watch

koerschens 3 жил өмнө
parent
commit
0b9614d949

+ 9 - 2
python/gpu_status.py

@@ -1,11 +1,18 @@
 import argparse
 import argparse
-from typing import Protocol
-
 import requests
 import requests
+
 from renderer import Renderer
 from renderer import Renderer
 
 
 parser = argparse.ArgumentParser(description="Prints the status of server nodes and their GPUs.")
 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(
 parser.add_argument(
     "-s", 
     "-s", 
     "--server", 
     "--server",