diff --git a/tests/test_base_plugin.py b/tests/test_base_plugin.py index f0060ae9..84f4bf3e 100644 --- a/tests/test_base_plugin.py +++ b/tests/test_base_plugin.py @@ -104,8 +104,8 @@ def test_plugin_info_repr(self): "Redis pool set: False, Message producer set: False, Kafka client set: False, " \ "Zookeeper client set: False], KV store class: PanoptesTestKeyValueStore, " \ "Last executed timestamp: 1458947997, Last executed key: plugin_metadata:plugin__name:" \ - "61547fbb304169f2a076016678bc9cca:last_executed, Last results timestamp: 1458948005, " \ - "Last results key: plugin_metadata:plugin__name:61547fbb304169f2a076016678bc9cca:last_results, " \ + "0846d379300f4be100f824125fbbe575:last_executed, Last results timestamp: 1458948005, " \ + "Last results key: plugin_metadata:plugin__name:0846d379300f4be100f824125fbbe575:last_results, " \ "Data: Data object passed, Lock: Lock is set" self.assertEqual(repr(panoptes_plugin_info), repr_string) diff --git a/yahoo_panoptes/framework/plugins/panoptes_base_plugin.py b/yahoo_panoptes/framework/plugins/panoptes_base_plugin.py index 1d20926d..4544f302 100644 --- a/yahoo_panoptes/framework/plugins/panoptes_base_plugin.py +++ b/yahoo_panoptes/framework/plugins/panoptes_base_plugin.py @@ -515,7 +515,7 @@ def signature(self): str: A hash of the plugin's config and data """ - return hashlib.md5(json.dumps(self.config, sort_keys=True) + str(hash(self.data))).hexdigest() + return hashlib.md5(self.normalized_name + repr(self.data)).hexdigest() @property def lock(self):