mirror of
https://github.com/jcwimer/openstack-exporter
synced 2026-03-24 17:44:42 +00:00
Close openstack connections to prevent pid growth
This commit is contained in:
@@ -95,9 +95,11 @@ if __name__ == '__main__':
|
|||||||
instance_deploy.get_metrics(connection, args.flavor, args.image, args.network,args.cloud_name)
|
instance_deploy.get_metrics(connection, args.flavor, args.image, args.network,args.cloud_name)
|
||||||
if args.horizon_url is not None:
|
if args.horizon_url is not None:
|
||||||
horizon.get_metrics(args.horizon_url, args.cloud_name)
|
horizon.get_metrics(args.horizon_url, args.cloud_name)
|
||||||
|
connection.close()
|
||||||
print("Waiting 30 seconds to gather more metrics.")
|
print("Waiting 30 seconds to gather more metrics.")
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
connection.close()
|
||||||
print(traceback.print_exc())
|
print(traceback.print_exc())
|
||||||
print("Waiting 30 seconds to gather more metrics.")
|
print("Waiting 30 seconds to gather more metrics.")
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
|||||||
Reference in New Issue
Block a user