Skip to content
New issue

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

standardize commit logging and return on edge and node writers #172

Open
dosumis opened this issue Mar 2, 2020 · 1 comment
Open

standardize commit logging and return on edge and node writers #172

dosumis opened this issue Mar 2, 2020 · 1 comment
Assignees

Comments

@dosumis
Copy link
Member

dosumis commented Mar 2, 2020

  • As usual, every method should return something useful or False
  • KB_tools write objects accumulate a stack of cypher statements until .commit() is called.
  • KB_tools Writer object commits should return False if any part of the commit stack has failed
  • Error messages that indicate failure of a statement in the commit stack are logged (not returned by the commit statement).
  • If the error log has any content, then commit returns False, otherwise it returns True. It is the responsibility of the calling script to check for False return and then check the log.
  • We need a mechanism to reliably clear the error log between commits. As we are only logging commit-time errors, this can happen at the beginning of a commit. This has the disadvantage that the old error log hangs around until the next commit.
  • .get_log => returns log and clears it
  • pattern error log is simply a concatenation of edge and node writer error logs.
@dosumis
Copy link
Member Author

dosumis commented Mar 2, 2020

Co-ordinate with work on curation repo!

@dosumis dosumis self-assigned this Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant