diff --git a/cocluto/quman.py b/cocluto/quman.py index d8602e8..375a374 100755 --- a/cocluto/quman.py +++ b/cocluto/quman.py @@ -397,6 +397,9 @@ def main(): show_parser = subparsers.add_parser("show-disable-requests", help="Show disable requests") show_parser.add_argument("queue", nargs="?", default=None, help="Optional: specific queue to show (if omitted, shows all)") + # update-db action + update_db_parser = subparsers.add_parser("update-db", help="updates quman database to synchronize with the actual state of the queues in the grid engine by querying qstat. Only needed if the grid engine state has been modified outside of quman (e.g., by manually running qmod). This is automatically done at the beginning of each quman command, so there should be no need to run this command manually in normal usage.") # noqa: F841 pylint:disable=unused-variable + try: args = parser.parse_args() @@ -456,6 +459,8 @@ def main(): print(f"Queue machine: {queue_machine}") for dr in disable_requests: print(f" Disable request by {dr.user_id} on {dr.host_fqdn} at {dr.timestamp.isoformat()} with disable id '{dr.disable_id}' for reason: {dr.reason}") + elif args.action == "update-db": + quman.synchronize_with_grid_engine() if test_mode: grid_engine.get_status().save_as_json(queues_status_file_path) diff --git a/cocluto/version.py b/cocluto/version.py index 85ecff5..b9a98ea 100644 --- a/cocluto/version.py +++ b/cocluto/version.py @@ -1,4 +1,4 @@ -__version__ = '1.0.18' +__version__ = '1.0.19' class Version(object):