Merge "[API] Disallow MnB messages if disabled"
This commit is contained in:
commit
07c05f229a
|
@ -42,8 +42,8 @@ class UsageStats(object):
|
|||
self.start_stats_sched()
|
||||
|
||||
def shutdown(self):
|
||||
if self.billing_timer:
|
||||
self.billing_timer.cancel()
|
||||
if self.stats_timer:
|
||||
self.stats_timer.cancel()
|
||||
|
||||
def gather_stats(self):
|
||||
# Work out if it is our turn to run
|
||||
|
|
|
@ -31,8 +31,10 @@ LOG = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def update_mnb(event_type, lbid, tenant_id):
|
||||
# Start a new thread
|
||||
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
||||
|
||||
if cfg.CONF['admin_api'].billing_enable:
|
||||
# Start a new thread
|
||||
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
||||
|
||||
|
||||
def client_job(event_type, lbid, tenant_id):
|
||||
|
|
Loading…
Reference in New Issue