From f14904f8ca96560b425c5a23e295d4d3d8b473c9 Mon Sep 17 00:00:00 2001 From: Jose Gracia Date: Fri, 23 Feb 2024 16:53:11 +0100 Subject: [PATCH] Report only energy if script name is get_energy.py --- monitoring/db/scripts/get_detailed_power.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitoring/db/scripts/get_detailed_power.py b/monitoring/db/scripts/get_detailed_power.py index 5218d9b..2449b2b 100755 --- a/monitoring/db/scripts/get_detailed_power.py +++ b/monitoring/db/scripts/get_detailed_power.py @@ -282,6 +282,8 @@ if __name__ == "__main__": config = parse_arguments(sys.argv[1:]) config.cmd = " ".join(sys.argv) config.datetime = f"{datetime.now()}" + if os.path.basename(__file__) == 'get_energy.py': + config.energy_only = True main = App(config) main.run_all()