Merge "Revert commits to use UID instead of SelfLink"
This commit is contained in:
commit
db9d28da79
|
@ -59,4 +59,4 @@ class ControllerPipeline(h_dis.EventPipeline):
|
|||
|
||||
def _wrap_dispatcher(self, dispatcher):
|
||||
return h_log.LogExceptions(h_async.Async(dispatcher, self._tg,
|
||||
h_k8s.object_link))
|
||||
h_k8s.object_uid))
|
||||
|
|
|
@ -99,7 +99,7 @@ class Async(base.EventHandler):
|
|||
self._handler(event)
|
||||
|
||||
def _done(self, thread, group):
|
||||
LOG.debug("Asynchronous handler stopped processing %s", group)
|
||||
LOG.debug("Asynchronous handler stopped processing group %s", group)
|
||||
queue = self._queues.pop(group)
|
||||
|
||||
if not queue.empty():
|
||||
|
|
|
@ -24,9 +24,9 @@ def object_kind(event):
|
|||
return None
|
||||
|
||||
|
||||
def object_link(event):
|
||||
def object_uid(event):
|
||||
try:
|
||||
return event['object']['metadata']['selfLink']
|
||||
return event['object']['metadata']['uid']
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
|
|
|
@ -57,4 +57,4 @@ class TestControllerPipeline(test_base.TestCase):
|
|||
self.assertEqual(logging_handler, ret)
|
||||
m_logging_type.assert_called_with(async_handler)
|
||||
m_async_type.assert_called_with(dispatcher, thread_group,
|
||||
h_k8s.object_link)
|
||||
h_k8s.object_uid)
|
||||
|
|
Loading…
Reference in New Issue