Skip to content

Commit

Permalink
Make _send_sensor_data more cooperative
Browse files Browse the repository at this point in the history
This change adds yielding execution to other greenthreads to
_send_sensor_data periodic task to make it more cooperative.

Change-Id: I03a54ce272b6899af0a978c27bc787f106a37906
  • Loading branch information
openvdro committed Nov 5, 2014
1 parent 0272fff commit 8a7ab1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ironic/conductor/manager.py
Expand Up @@ -1257,6 +1257,9 @@ def _send_sensor_data(self, context):
if message['payload']:
self.notifier.info(context, "hardware.ipmi.metrics",
message)
finally:
# Yield on every iteration
eventlet.sleep(0)

def _filter_out_unsupported_types(self, sensors_data):
# support the CONF.send_sensor_data_types sensor types only
Expand Down

0 comments on commit 8a7ab1f

Please sign in to comment.