]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
resources_rpc: fixed singleton behavior for ResourcesPullRpcApi
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 10 Aug 2015 06:57:41 +0000 (08:57 +0200)
committerJakub Libosvar <libosvar@redhat.com>
Mon, 10 Aug 2015 09:20:18 +0000 (09:20 +0000)
commit4ef2dcc106eb8014daf0f94e12db1030eb86aab6
tree5ec76784df85d668bdb0ff461fb77318b834ea50
parenta7eeab83ebe1023c14cfaab6b8366a6950e3551d
resources_rpc: fixed singleton behavior for ResourcesPullRpcApi

__init__ is called for any __call__ on a class, no matter whether it is
a singleton. Meaning, client was reinitialized every time a caller
instantiated the Rpc class. That's not a critical issue, but a minor
performance hit.

Change-Id: I24272ba44eb502c8552d3556c84214942944646c
Partially-Implements: blueprint quantum-qos-api
neutron/api/rpc/handlers/resources_rpc.py
neutron/tests/unit/api/rpc/handlers/test_resources_rpc.py