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

@mpchadwick mpchadwick commented Dec 15, 2015

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

Based on discussions in #4

mpchadwick added 2 commits Dec 15, 2015
Allows others to hook in if there are other requirements
(e.g. alerting system)
Per PHPCS
@mpchadwick
Copy link
Contributor Author

@mpchadwick mpchadwick commented Dec 30, 2015

@LeeSaferite Any thoughts on this?

@sprankhub
Copy link

@sprankhub sprankhub commented Aug 19, 2016

👍

@kesonno
Copy link

@kesonno kesonno commented Jun 22, 2017

+1 for this addition 👍

@LeeSaferite
Copy link
Contributor

@LeeSaferite LeeSaferite commented Jun 22, 2017

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

@fbrnc

@sourcesoldier sourcesoldier requested a review from LeeSaferite Jun 23, 2017
@@ -35,6 +35,7 @@ public function query($sql, $bind = [])
$try = $maxTries;
} catch (Exception $e) {
$try++;
Mage::dispatchEvent('aoe_dbretry_exception', ['try' => $try, 'exception' => $e]);

This comment has been minimized.

@LeeSaferite

LeeSaferite Jun 23, 2017
Contributor

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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants