We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi all,
I think it's good to add opcode for notification in configdb.py to verify the difference between these:
"AAA": null "AAA": {}
So I want to contribute a PR with this patch as bellow, but I have no access for push and merge PR? How to deal with this?
commit f547f9c02347e7b42962278005bcba973892a18b Author: sam <[email protected]> Date: Tue Nov 27 11:31:27 2018 +0800 add opcode in redis notification diff --git a/src/swsssdk/configdb.py b/src/swsssdk/configdb.py index e255979..87cad6e 100644 --- a/src/swsssdk/configdb.py +++ b/src/swsssdk/configdb.py @@ -76,10 +76,10 @@ class ConfigDBConnector(SonicV2Connector): if self.handlers.has_key(table): self.handlers.pop(table) - def __fire(self, table, key, data): + def __fire(self, table, key, data, op_str='add'): if self.handlers.has_key(table): handler = self.handlers[table] - handler(table, key, data) + handler(table, key, data, op_str) def listen(self): """Start listen Redis keyspace events and will trigger corresponding handlers when content of a table changes. @@ -94,7 +94,11 @@ class ConfigDBConnector(SonicV2Connector): if self.handlers.has_key(table): client = self.redis_clients[self.CONFIG_DB] data = self.__raw_to_typed(client.hgetall(key)) - self.__fire(table, row, data) + op = client.keys(key) + op_str = 'add' + if len(op) == 0: + op_str = 'del' + self.__fire(table, row, data, op_str) except ValueError: pass #Ignore non table-formated redis entries
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi all,
I think it's good to add opcode for notification in configdb.py to verify the difference between these:
So I want to contribute a PR with this patch as bellow, but I have no access for push and merge PR? How to deal with this?
The text was updated successfully, but these errors were encountered: