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

Improve error handling when updating the trigger histories #93

Merged

Conversation

ribsalad
Copy link

@ribsalad ribsalad commented May 3, 2021

If a trigger misfires, insert it into the trigger histories and update on duplicate keys.

In the case of a mis fired trigger, inserting into the DB shouldn't cause an exception. Instead, we should update the existing entry to match the misfired trigger matching the primary key. This can happen many times until the trigger stops misfiring.

@ribsalad
Copy link
Author

ribsalad commented May 4, 2021

@tmccombs I see the All checks have failed showing up. How can I see why the checks failed so I can fix them? Thanks!

finish = Values(finish),
misfire = Values(misfire),
fire_instance_id = Values(fire_instance_id)
""".stripMargin,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is the problem, my IDE is set up to add the trailing commas with the formatter when I ctrl+s.

…e on duplicate keys.

In the case of a mis fired trigger, inserting into the DB shouldn't cause an exception. Instead, we should update the existing entry to match the misfired trigger matching the primary key. This can happen many times until the trigger stops misfiring.
@ribsalad ribsalad force-pushed the prevent-exception-on-trigger-misfire branch from 14a9feb to 4b124a8 Compare May 4, 2021 15:59
@tmccombs tmccombs merged commit 27b954d into lucidsoftware:master May 4, 2021
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

Successfully merging this pull request may close these issues.

2 participants