cocluto v1.0.19 - added the update-db action to quman
work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3093]
This commit is contained in:
parent
381ec9f1af
commit
9266ad8278
|
|
@ -397,6 +397,9 @@ def main():
|
||||||
show_parser = subparsers.add_parser("show-disable-requests", help="Show disable requests")
|
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)")
|
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:
|
try:
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
@ -456,6 +459,8 @@ def main():
|
||||||
print(f"Queue machine: {queue_machine}")
|
print(f"Queue machine: {queue_machine}")
|
||||||
for dr in disable_requests:
|
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}")
|
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:
|
if test_mode:
|
||||||
grid_engine.get_status().save_as_json(queues_status_file_path)
|
grid_engine.get_status().save_as_json(queues_status_file_path)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
__version__ = '1.0.18'
|
__version__ = '1.0.19'
|
||||||
|
|
||||||
|
|
||||||
class Version(object):
|
class Version(object):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue