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

Projects
None yet
5 participants
@mpchadwick
Contributor

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 some commits Dec 15, 2015

Dispatch an event if there is an exception
Allows others to hook in if there are other requirements
(e.g. alerting system)
@mpchadwick

This comment has been minimized.

Contributor

mpchadwick commented Dec 30, 2015

@LeeSaferite Any thoughts on this?

@sprankhub

This comment has been minimized.

sprankhub commented Aug 19, 2016

👍

@kesonno

This comment has been minimized.

kesonno commented Jun 22, 2017

+1 for this addition 👍

@LeeSaferite

This comment has been minimized.

Collaborator

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

Collaborator

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

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