From d1b88b05ee9d73aebb375f0ce5c48cf84a789344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20M=2E=20G=C3=B3mez?= Date: Sat, 30 Jun 2018 17:13:45 +0200 Subject: [PATCH] #750: Using more descriptive status; new route {{{POST /command}}} to launch command/script in a callback thread that returns all data to a server route. --- src/opengnsys/modules/server/OpenGnSys/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengnsys/modules/server/OpenGnSys/__init__.py b/src/opengnsys/modules/server/OpenGnSys/__init__.py index 610bba2..2228d78 100644 --- a/src/opengnsys/modules/server/OpenGnSys/__init__.py +++ b/src/opengnsys/modules/server/OpenGnSys/__init__.py @@ -83,6 +83,7 @@ def check_locked_partition(sync=False): """ Decorator to check if a partition is locked """ + def outer(fnc): def wrapper(*args, **kwargs): part_id = 'None' @@ -101,7 +102,9 @@ def check_locked_partition(sync=False): if sync is True: this.locked[part_id] = False logger.debug('Lock status: {} {}'.format(fnc, this.locked)) + return wrapper + return outer