Skip to content

self.autocommit somehow being corrupted #12

Description

@drheinheim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions