I was having an issue (with MySQL) whereby commits were not happening as expected. For example, using hydra_client.call('add_project', new_project) would return the correct project, with a new ID, but the project wasn't committed to the DB.
I narrowed down the issue to self.autocommit in the hydra_client.JSONConnection somehow being corrupted. Whereas it defaults to True, it changes from True to some function (<function BaseConnection.getattr..wrapped at 0x00000187FB68A6A8>), so that if self.autocommit == True now becomes False, and no commits are made.
I'm not sure what the root cause is, but my band-aid fix seems to work: just set hc.autocommit = True before every call. I alread have hydra_client in my own custom wrapper class, so it's one line, but still this is an issue.
I was having an issue (with MySQL) whereby commits were not happening as expected. For example, using
hydra_client.call('add_project', new_project)would return the correct project, with a new ID, but the project wasn't committed to the DB.I narrowed down the issue to
self.autocommitin the hydra_client.JSONConnection somehow being corrupted. Whereas it defaults to True, it changes from True to some function (<function BaseConnection.getattr..wrapped at 0x00000187FB68A6A8>), so thatif self.autocommit == Truenow becomes False, and no commits are made.I'm not sure what the root cause is, but my band-aid fix seems to work: just set
hc.autocommit = Truebefore every call. I alread have hydra_client in my own custom wrapper class, so it's one line, but still this is an issue.