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

Dispatch an event if there is an exception #5

Merged
merged 2 commits into from Jan 25, 2018

Conversation

mpchadwick
Copy link
Contributor

Allows others to hook in if there are other requirements (e.g. alerting system).

Based on discussions in #4

Allows others to hook in if there are other requirements
(e.g. alerting system)
@mpchadwick
Copy link
Contributor Author

@LeeSaferite Any thoughts on this?

@sprankhub
Copy link

👍

@kesonno
Copy link

kesonno commented Jun 22, 2017

+1 for this addition 👍

@LeeSaferite
Copy link
Contributor

I see no reason not to merge this, but I no longer work for AOE and not longer have merge permissions.

@fbrnc

@@ -35,6 +35,7 @@ public function query($sql, $bind = [])
$try = $maxTries;
} catch (Exception $e) {
$try++;
Mage::dispatchEvent('aoe_dbretry_exception', ['try' => $try, 'exception' => $e]);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think my only input here would be to document the event in the readme and be VERY clear that further DB calls in the event handler are unsupported and dangerous.

@jadhub jadhub merged commit 15ada4a into AOEpeople:master Jan 25, 2018
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.

None yet

5 participants